Scrutinizer can process code coverage information that you generate during your build. We currently support code coverage processing for PHP, Python and Ruby, and also support merging your code coverage data should you run tests in parallel.
For PHP, we support the
clover format that is generated for example by
phpunit. When setting up your test commands,
simply specify where we find the coverage file and what format it has:
build: tests: override: - command: 'vendor/bin/phpunit --coverage-clover=some-file' coverage: file: 'some-file' format: 'clover'
For Python, we support data generated by
coverage. When setting up your test commands, simply specify where we find
.coverage file, and potentially your
.coveragerc configuration file:
build: tests: override: - command: './run-tests.sh' coverage: file: '.coverage' config_file: '.coveragerc' format: 'py-cc'
For Ruby, code coverage can be generated using our
scrutinizer-ocular gem that uses
SimpleCov internally. When
you have set-up the scrutinizer-ocular gem, make sure to set the
SCRUTINIZER_CC_FILE environment variable:
build: tests: override: - command: 'bundle exec rspec spec' environment: 'SCRUTINIZER_CC_FILE': 'my-coverage' coverage: file: 'my-coverage' format: 'rb-cc'
We also support the
build: dependencies: before: - npm install istanbul # or add it as part of your package.json tests: override: - command: 'istanbul cover --report clover test.js' coverage: file: 'coverage/clover.xml' format: 'clover'