New Test Reporter Public Beta
Our new test reporter, with support for parallelized CI builds, is now in public beta! View its documentation here.
Soon to be deprecated!
These configuration instructions refer to a language-specific test reporter that will soon be deprecated in favor of our new unified test reporter client. The new test reporter supports many more languages as well as parallel build support.
- Add the codeclimate-test-reporter and simplecov gems to your
group :test do gem "simplecov" gem "codeclimate-test-reporter", "~> 1.0.0" end
- Start SimpleCov at the very top of your
spec/spec_helper.rb, or Cucumber
require "simplecov" SimpleCov.start
- Run your tests (this produces the SimpleCov coverage report):
bundle exec rake
- Run the codeclimate-test-reporter executable after your test suite. This submits the coverage report to Code Climate. Make sure to set the CODECLIMATE_REPO_TOKEN environment variable:
CODECLIMATE_REPO_TOKEN=<token> bundle exec codeclimate-test-reporter
Note: This token is specific to this repo on Code Climate and grants any user the ability to submit test coverage reports on your behalf. We recommend defining this token as an environment variable within your CI's user interface or configuration file.