From a255973cd451070fc245034018827f3a4d16ff72 Mon Sep 17 00:00:00 2001 From: ADmad Date: Thu, 23 Feb 2017 18:54:50 +0530 Subject: [PATCH] Run tests on PHP 7.1 too. --- .travis.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba5516be..d1efac0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ php: - 5.4 - 5.5 - 5.6 - - 7 + - 7.0 + - 7.1 env: global: @@ -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