Skip to content

Commit

Permalink
Run tests on PHP 7.1 too.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 23, 2017
1 parent 306e63b commit a255973
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ php:
- 5.4
- 5.5
- 5.6
- 7
- 7.0
- 7.1

env:
global:
Expand All @@ -17,27 +18,23 @@ matrix:
- php: 7.0
env: PHPCS=1 DEFAULT=0

- php: 7.0
env: CODECOVERAGE=1 DEFAULT=0

before_script:
- sh -c "if [ '$CODECOVERAGE' != '1' ]; then phpenv config-rm xdebug.ini; fi"
- if [[ $CODECOVERAGE != 1 ]]; then phpenv config-rm xdebug.ini; fi

- sudo apt-get install wkhtmltopdf -y
- sudo touch /usr/bin/latexpdf && sudo chmod +x /usr/bin/latexpdf

- composer install --no-interaction

- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:~2.0; fi"
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.0; fi

script:
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"

- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config; fi"
- 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 [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config; fi

- sh -c "if [ '$CODECOVERAGE' = '1' ]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"
after_success:
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.0 ]]; then bash <(curl -s https://codecov.io/bash); fi

notifications:
email: false

0 comments on commit a255973

Please sign in to comment.