Skip to content

Commit 33db556

Browse files
committed
Merge pull request #236 from stof/scrutinizer_coverage
Fix the upload of the code coverage to Scrutinizer
2 parents cdad036 + 8542189 commit 33db556

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,18 @@ before_script:
3636
# Install NGINX
3737
- sh ./tests/install-nginx.sh
3838
# Starting webserver
39-
- sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./tests/ci/install-apache-hhvm.sh; fi"
39+
- if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ]; then ./tests/ci/install-apache-hhvm.sh; fi
4040

4141
script:
4242
- phpunit --coverage-clover=coverage.clover
4343
- make -C doc SPHINXOPTS='-nW' html
4444
- make -C doc spelling
4545

4646
after_script:
47-
- wget https://scrutinizer-ci.com/ocular.phar
48-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
47+
# avoid uploading the code coverage for PHP 7 and HHVM as they cannot generate it (PHPUnit dropped the old HHVM driver
48+
# and the XDebug API is not implemented in HHVM 3.5) and we don't want to cancel the Scrutinizer analysis by notifying
49+
# it than no coverage data is available
50+
- if [[ "$TRAVIS_PHP_VERSION" != "7" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
4951

5052
after_failure:
5153
- cat /tmp/fos_nginx_error.log

0 commit comments

Comments
 (0)