Created
May 8, 2024 13:33
-
-
Save duzenko/e8c29c30f5975f352b7596f95941d556 to your computer and use it in GitHub Desktop.
staging codeception script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
id; pwd | |
cd httpdocs | |
TEST_BIN=tests/_output/report.bin | |
TEST_RESULT=0 | |
if [ -f $TEST_BIN ]; then # require user action after a failure | |
TEST_RESULT=$(cat $TEST_BIN) | |
if [ "$TEST_RESULT" -ne 0 ]; then | |
echo Last run failed - awaiting user acknowledgement | |
exit | |
fi | |
fi | |
composer require codeception/module-rest --dev # if plesk overwrites composer packages | |
geckodriver & # webdriver | |
/opt/plesk/php/8.2/bin/php vendor/bin/codecept run --env staging --html | |
TEST_RESULT=$? | |
pkill geckodriver | |
echo $TEST_RESULT >$TEST_BIN | |
exit $TEST_RESULT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment