Skip to content

Commit d98e6d3

Browse files
committed
Update travis config
1 parent 876879c commit d98e6d3

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

.travis.yml

+16-19
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ php:
66
- 7.1
77
- 7.2
88

9-
sudo: false
10-
119
env:
1210
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'
1412
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
1513
- DB=sqlite db_dsn='sqlite:///:memory:'
1614

@@ -21,37 +19,36 @@ matrix:
2119
fast_finish: true
2220

2321
include:
24-
- php: 7.0
22+
- php: 7.1
2523
env: PHPCS=1 DEFAULT=0
2624

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
2927

3028
- php: 5.6
3129
env: PREFER_LOWEST=1
3230

3331
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
3833

3934
- if [[ $PREFER_LOWEST != 1 ]]; then composer update --no-interaction ; fi
4035
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --no-interaction --prefer-lowest ; fi
4136

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
4439

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
4642

4743
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
4946

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
5149

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
5552

5653
notifications:
57-
email: false
54+
email: false

0 commit comments

Comments
 (0)