@@ -2,27 +2,25 @@ language: php
22
33php :
44 - 5.6
5- - 7.0
6- - 7.1
7- - 7.2
5+ - 7.4
86
9- dist : trusty
10-
11- sudo : false
7+ services :
8+ - postgresql
9+ - mysql
1210
1311env :
1412 global :
1513 - DEFAULT=1
16- - CODECOVERAGE=0
14+ matrix :
15+ -
DB=mysql DB_DSN='mysql://[email protected] /cakephp_test?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"' 16+ -
DB=pgsql DB_DSN='postgres://[email protected] /cakephp_test' 17+ - DB=sqlite DB_DSN='sqlite:///:memory:'
1718
1819matrix :
1920 fast_finish : true
2021
2122 include :
22- - php : 7.2
23- env : CODECOVERAGE=1 DEFAULT=0
24-
25- - php : 7.0
23+ - php : 7.4
2624 env : PHPCS=1 DEFAULT=0
2725
2826 - php : 7.1
@@ -31,22 +29,30 @@ matrix:
3129 - php : 5.6
3230 env : PREFER_LOWEST=1
3331
34- before_script :
35- - if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi
32+ before_install :
33+ - if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
34+ - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
35+
36+ install :
37+ - if [[ $TRAVIS_PHP_VERSION != 7.4 ]]; then phpenv config-rm xdebug.ini; fi
3638
37- - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.11; fi
3839 - if [[ $PHPSTAN != 1 ]]; then composer install --no-interaction; fi
40+ - |
41+ if [[ $PHPSTAN == 1 ]]; then
42+ composer require phpstan/phpstan:^0.12
43+ composer install --no-dev
44+ fi
3945
4046script :
41- - if [[ $CODECOVERAGE = 1 ]]; then ./vendor/bin/phpunit --coverage-clover=clover.xml; fi
42- - if [[ $DEFAULT = 1 ]]; then ./vendor/bin/phpunit; fi
47+ - if [[ $TRAVIS_PHP_VERSION == 7.4 ]]; then ./vendor/bin/phpunit --coverage-clover=clover.xml; fi
48+ - if [[ $DEFAULT == 1 ]]; then ./vendor/bin/phpunit; fi
4349
44- - if [[ $PHPCS = 1 ]]; then ./vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
50+ - if [[ $PHPCS == 1 ]]; then ./vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
4551
46- - if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse src; fi
52+ - if [[ $PHPSTAN == 1 ]]; then vendor/bin/phpstan analyse src; fi
4753
4854after_success :
49- - if [[ $CODECOVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
55+ - if [[ $TRAVIS_PHP_VERSION == 7.4 ]]; then bash <(curl -s https://codecov.io/bash); fi
5056
5157notifications :
5258 email : false
0 commit comments