diff --git a/.travis.yml b/.travis.yml index 68cf1f1..3639cef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,19 @@ php: - 7.1 - hhvm +env: matrix: + include: + - php: 7.1 + env: coverage=on + allow_failures: - php: hhvm + - php: 7.1 + env: coverage=on script: - - vendor/bin/tester tests -s $coverage + - vendor/bin/tester tests -s $coverageArgs - php temp/code-checker/src/code-checker.php --short-arrays after_failure: @@ -23,12 +30,12 @@ before_script: # Install Nette Tester & Code Checker - travis_retry composer install --no-interaction --prefer-dist - travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction - - if [ $TRAVIS_PHP_VERSION == "7.0" ]; then coverage="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi + - if [ "$coverage" == "on" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi after_script: # Report Code Coverage - > - if [ "$coverage" != "" ]; then + if [ "$coverage" == "on" ]; then wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar && php coveralls.phar --verbose --config tests/.coveralls.yml || true; fi