6
6
- 7.1
7
7
- 7.2
8
8
9
- sudo : false
10
-
11
9
env :
12
10
matrix :
13
- - DB=mysql db_dsn='mysql://travis@0 .0.0.0 /cakephp_test'
11
+ - DB=mysql db_dsn='mysql://root@127 .0.0.1 /cakephp_test'
14
12
-
DB=pgsql db_dsn='postgres://[email protected] /cakephp_test'
15
13
- DB=sqlite db_dsn='sqlite:///:memory:'
16
14
@@ -21,37 +19,36 @@ matrix:
21
19
fast_finish : true
22
20
23
21
include :
24
- - php : 7.0
22
+ - php : 7.1
25
23
env : PHPCS=1 DEFAULT=0
26
24
27
- - php : 7.0
28
- env :
CODECOVERAGE =1 DEFAULT=0 DB=mysql db_dsn='mysql://[email protected] /cakephp_test'
25
+ - php : 7.1
26
+ env : PHPSTAN =1 DEFAULT=0
29
27
30
28
- php : 5.6
31
29
env : PREFER_LOWEST=1
32
30
33
31
before_script :
34
- - phpenv config-rm xdebug.ini
35
-
36
- - composer self-update
37
- - composer install --prefer-dist --no-interaction
32
+ - if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi
38
33
39
34
- if [[ $PREFER_LOWEST != 1 ]]; then composer update --no-interaction ; fi
40
35
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --no-interaction --prefer-lowest ; fi
41
36
42
- - sh -c " if [ ' $DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
43
- - sh -c " if [ ' $DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
37
+ - if [[ $DB = 'mysql' ]] ; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
38
+ - if [[ $DB = 'pgsql' ]] ; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
44
39
45
- - sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer; fi"
40
+ - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer; fi
41
+ - if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan; fi
46
42
47
43
script :
48
- - sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"
44
+ - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi
45
+ - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi
49
46
50
- - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
47
+ - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
48
+ - if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -l 5 -c phpstan.neon src; fi
51
49
52
- - sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
53
- - sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
54
- - sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"
50
+ after_success :
51
+ - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi
55
52
56
53
notifications :
57
- email : false
54
+ email : false
0 commit comments