Used multiple commands with && instead of composer array for API tests command

This commit is contained in:
Alejandro Celaya 2019-01-27 10:15:48 +01:00
parent fa753ad6fb
commit f467bed24c
2 changed files with 4 additions and 5 deletions

View file

@ -114,11 +114,7 @@
"test:unit": "phpdbg -qrr vendor/bin/phpunit --order-by=random --coverage-php build/coverage-unit.cov",
"test:unit:ci": "phpdbg -qrr vendor/bin/phpunit --order-by=random --coverage-php build/coverage-unit.cov --coverage-clover=build/clover.xml --coverage-xml=build/coverage-xml --log-junit=build/phpunit.junit.xml",
"test:db": "APP_ENV=test phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-db.xml --coverage-php build/coverage-db.cov",
"test:api": [
"APP_ENV=test vendor/bin/zend-expressive-swoole start -d",
"APP_ENV=test phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-api.xml",
"APP_ENV=test vendor/bin/zend-expressive-swoole stop"
],
"test:api": "APP_ENV=test vendor/bin/zend-expressive-swoole start -d && echo 'Waiting 2 seconds for server to start...' && sleep 2 && APP_ENV=test phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-api.xml && APP_ENV=test vendor/bin/zend-expressive-swoole stop",
"test:pretty": [
"@test",

View file

@ -19,6 +19,9 @@ return [
'port' => 9999,
'host' => '127.0.0.1',
'process-name' => 'shlink_test',
'options' => [
'pid_file' => sys_get_temp_dir() . '/shlink-test-swoole.pid',
],
],
],