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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With