mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-23 06:38:34 +01:00
Add MySQL tests to Travis config
This commit is contained in:
parent
0e7a8a3166
commit
4452a0b920
16
.travis.yml
16
.travis.yml
@ -7,14 +7,26 @@ php:
|
|||||||
- 7.4
|
- 7.4
|
||||||
- 8.0
|
- 8.0
|
||||||
|
|
||||||
|
services:
|
||||||
|
- mysql
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.composer/cache
|
||||||
|
- $HOME/vendor
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- mysql -e 'CREATE DATABASE 2fauth_test;'
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- travis_retry composer self-update
|
- travis_retry composer self-update
|
||||||
- travis_retry composer install --no-interaction
|
- travis_retry composer install --no-interaction --prefer-source
|
||||||
# no need to use a dedicated Travis .env file as phpunit
|
# no need to use a dedicated Travis .env file as phpunit
|
||||||
# will use .env.testing by default
|
# will use .env.testing by default
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpunit --coverage-clover=coverage.xml
|
- DATABASE=mysql vendor/bin/phpunit -c phpunit-mysql.xml
|
||||||
|
- DATABASE=sqlite vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Submit coverage report to https://codecov.io
|
# Submit coverage report to https://codecov.io
|
||||||
|
@ -32,10 +32,10 @@
|
|||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<!-- following values override .env.testing vars -->
|
<!-- following values override .env.testing vars -->
|
||||||
<env name="DB_CONNECTION" value="mysql"/>
|
<env name="DB_CONNECTION" value="mysql"/>
|
||||||
<env name="DB_HOST" value="localhost"/>
|
<env name="DB_HOST" value="127.0.0.1"/>
|
||||||
<env name="DB_PORT" value="3306"/>
|
<env name="DB_PORT" value="3306"/>
|
||||||
<env name="DB_DATABASE" value="2fauth_test"/>
|
<env name="DB_DATABASE" value="2fauth_test"/>
|
||||||
<env name="DB_USERNAME" value="test_user"/>
|
<env name="DB_USERNAME" value="travis"/>
|
||||||
<env name="DB_PASSWORD" value="password"/>
|
<env name="DB_PASSWORD" value=""/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
Loading…
Reference in New Issue
Block a user