7

I have this project on GitHub. In my .travis.yml file, I use the same configuration I use on every project, to upload the code coverage data to Scrutinizer:

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover test/build/logs/clover.xml

Here's the most recent successful build on Travis:

https://travis-ci.org/mindplay-dk/boxy/builds/61963347

And here's the most recent failed inspection on Scrutinizer:

https://scrutinizer-ci.com/g/mindplay-dk/boxy/inspections/ac33c2fb-6083-4984-bf41-983e4d0f54e2

The error message "Scrutinizer was notified that the tests failed", appears to show up as soon as Travis uploads the code coverage data.

halfer
  • 19,824
  • 17
  • 99
  • 186
mindplay.dk
  • 7,085
  • 3
  • 44
  • 54

1 Answers1

6

If you check the individual build jobs, there should be one where the upload command outputs something like "Notifying that no code coverage is available".

This is typically happening for the HHVM build, or a PHP 7 build which both do not support running code coverage.

To fix this, make sure that you do not run the upload command for these versions:

after_script:
  - if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
secondtruth
  • 89
  • 1
  • 9
  • 1
    Thanks, I have been doing that for a while. In the end, I just wrote to them and asked, and they fixed something on their end that made it blow up. I haven't had the problem again since. – mindplay.dk Aug 06 '15 at 07:28