Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save duzenko/e8c29c30f5975f352b7596f95941d556 to your computer and use it in GitHub Desktop.
Save duzenko/e8c29c30f5975f352b7596f95941d556 to your computer and use it in GitHub Desktop.
staging codeception script
#!/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