Skip to content

Commit

Permalink
Update travis config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 20, 2018
1 parent b331337 commit 1dfc322
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3

env:
global:
Expand All @@ -14,30 +14,33 @@ matrix:
fast_finish: true

include:
- php: 7.0
- php: 7.2
env: COVERAGE=1 DEFAULT=0

- php: 7.2
env: PHPCS=1 DEFAULT=0

- php: 7.0
- php: 7.2
env: PHPSTAN=1 DEFAULT=0

before_script:
- if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi
- if [[ $TRAVIS_PHP_VERSION != 7.2 && $TRAVIS_PHP_VERSION != 7.3 ]]; then phpenv config-rm xdebug.ini; fi

- composer update --no-interaction

- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:"^3.0"; fi
- if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan:^0.8; fi
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:^3.0; fi
- if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan:^0.9; fi

script:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.0 ]]; then vendor/bin/phpunit; fi
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi
- if [[ $DEFAULT = 1 ]]; then vendor/bin/phpunit; fi
- if [[ $COVERAGE = 1 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi

- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi

- if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -c phpstan.neon -l 5 src; fi
- if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse src; fi

after_success:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi
- if [[ $COVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi

notifications:
email: false
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
parameters:
level: 5
ignoreErrors:
- '#Constant APP not found#'

0 comments on commit 1dfc322

Please sign in to comment.