diff --git a/.travis.yml b/.travis.yml index 43eb807..57742af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ language: php +services: + - postgresql + - mysql + php: - 7.2 - 7.3 @@ -8,32 +12,23 @@ php: sudo: false env: - - DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test' - - DB=pgsql db_dsn='postgres://travis@127.0.0.1/cakephp_test' - - DB=sqlite + matrix: + - DB=mysql DB_DSN='mysql://root@127.0.0.1/cakephp_test' + - DB=pgsql DB_DSN='postgres://postgres@127.0.0.1/cakephp_test' + - DB=sqlite DB_DSN='sqlite:///:memory:' matrix: fast_finish: true - include: - - php: 7.2 - env: COVERAGE=1 + +before_install: + - if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi + - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi install: - - composer self-update - composer install --prefer-dist --no-interaction -before_script: - - if [[ $DB == 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi - - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi - - phpenv rehash - - set +H - script: - - if [[ $COVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi - - if [[ $COVERAGE != 1 ]]; then vendor/bin/phpunit; fi - -after_success: - - if [[ $COVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi + - vendor/bin/phpunit notifications: email: false