Improved how API tests are executed

This commit is contained in:
Alejandro Celaya
2019-01-27 10:54:04 +01:00
parent 558e259b84
commit 76d8fd1023
4 changed files with 57 additions and 5 deletions

14
bin/test/run-api-tests.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
set -e
export APP_ENV=test
# Try to stop server just in case it hanged in last execution
vendor/bin/zend-expressive-swoole stop
echo 'Starting server...'
vendor/bin/zend-expressive-swoole start -d
sleep 2
vendor/bin/phpunit --order-by=random -c phpunit-api.xml
vendor/bin/zend-expressive-swoole stop