|
@@ -7,14 +7,26 @@ php:
|
|
|
- 7.4
|
|
|
- 8.0
|
|
|
|
|
|
+services:
|
|
|
+ - mysql
|
|
|
+
|
|
|
+cache:
|
|
|
+ directories:
|
|
|
+ - $HOME/.composer/cache
|
|
|
+ - $HOME/vendor
|
|
|
+
|
|
|
+before_install:
|
|
|
+ - mysql -e 'CREATE DATABASE 2fauth_test;'
|
|
|
+
|
|
|
before_script:
|
|
|
- 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
|
|
|
# will use .env.testing by default
|
|
|
|
|
|
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:
|
|
|
# Submit coverage report to https://codecov.io
|