Setting Up Test Coverage

📘

New Test Reporter (beta)

If you're configuring our new test reporter with Code Climate: Enterprise, please follow the instructions outlined here.

To report coverage to your locally-hosted Code Climate: Enterprise instance, export the CC_TEST_REPORTER_COVERAGE_ENDPOINT variable, or pass the --coverage-endpoint option to after-build.

CC_TEST_REPORTER_COVERAGE_ENDPOINT=https://codeclimate.my-domain.com/api/v1/test_reports

If you're using a self-signed certificate, export the SSL_CERT_FILE variable indicating the location of the certificate file when using after-build or upload-coverage commands.

Older Test Reporters

If you're using one of our older test reporters:

To point Code Climate test reporters to a Code Climate Enterprise instance, simply set a CODECLIMATE_API_HOST environment variable to your instance's root domain.

For example: CODECLIMATE_API_HOST=https://enterpise.yourcompany.net