shlink/bin/test/run-cli-tests.sh

20 lines
521 B
Bash
Raw Normal View History

#!/usr/bin/env sh
export APP_ENV=test
export TEST_ENV=cli
2024-10-24 04:50:06 -05:00
export DB_DRIVER="${DB_DRIVER:-"maria"}"
export GENERATE_COVERAGE="${GENERATE_COVERAGE:-"no"}"
[ "$GENERATE_COVERAGE" != 'no' ] && export XDEBUG_MODE=coverage
# Load and export test env vars
set -a
. ./config/test/shlink-test.env
set +a
vendor/bin/phpunit --order-by=random --testdox --testdox-summary -c phpunit-cli.xml $*
TESTS_EXIT_CODE=$?
# Exit this script with the same code as the tests. If tests failed, this script has to fail
exit $TESTS_EXIT_CODE