PHPUnit uses .env.testing by default, so that file needs to contain the APP_KEY

This commit is contained in:
Daniel_I_Am 2021-09-04 14:06:11 +02:00
parent a398558614
commit b289a4725b

View File

@ -15,9 +15,11 @@ php-build-job:
- composer install
- cp .env.testing .env
- php artisan key:generate
- cp .env .env.testing
artifacts:
paths:
- .env
- .env.testing
- vendor/
cache:
paths:
@ -43,7 +45,7 @@ php-test-job:
- export DB_DATABASE="$MYSQL_DATABASE"
- export DB_USERNAME=root
- export DB_PASSWORD="$MYSQL_ROOT_PASSWORD"
- ./vendor/bin/phpunit --coverage-cobertura code-coverage.xml
- php artisan test
artifacts:
reports:
cobertura: code-coverage.xml