Apply the env vars to the .env.testing file

This commit is contained in:
Daniel_I_Am 2021-09-05 18:08:26 +02:00
parent ad21930ca0
commit d9f95f1de9

View File

@ -53,12 +53,12 @@ test-job:
- pecl install xdebug
- echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini
- echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/xdebug.ini
- export DB_CONNECTION=mysql
- export DB_HOST=mysql
- export DB_PORT=3306
- export DB_DATABASE="$MYSQL_DATABASE"
- export DB_USERNAME=root
- export DB_PASSWORD="$MYSQL_ROOT_PASSWORD"
- echo "DB_CONNECTION=mysql" >> .env.testing
- echo "DB_HOST=mysql" >> .env.testing
- echo "DB_PORT=3306" >> .env.testing
- echo "DB_DATABASE=\"$MYSQL_DATABASE\"" >> .env.testing
- echo "DB_USERNAME=root" >> .env.testing
- echo "DB_PASSWORD=\"$MYSQL_ROOT_PASSWORD\"" >> .env.testing
- php artisan migrate:fresh --seed --env=.env.testing
- ./vendor/bin/phpunit --coverage-text --coverage-cobertura php-coverage.xml
artifacts: