This article is about General Codeship Configuration.

Using Codecov For Code Coverage

Estimated Reading Time: 1 min

About Codecov

Codecov is an automated code coverage service. Starting with Codecov and Codeship is fast and easy. Their documentation does a great job of providing more information, in addition to the setup instructions below.

Codeship Pro

Adding Upload Token

To start, you need to add your CODECOV_TOKEN to the encrypted environment variables that you encrypt and include in your codeship-services.yml file.

Project Configuration

Once your Codecov upload token is loaded via your environment variables, you will need to add the Codecov reporting command as a new step in your codeship-steps.yml file.

After running your test commands, you can add:

- name: codecov
  service: YOURSERVICE
  command: bash -c "curl -s https://codecov.io/bash"

Note that this uses their universal uploader. They also provide language and framework-specific packages that you can integrate directly into your test suite if you prefer. View their language-specific documentation and examples for more specific information.

Codeship Basic

Adding Upload Token

To start, you need to add your CODECOV_TOKEN to your to your project’s environment variables.

You can do this by navigating to Project Settings and then clicking on the Environment tab.

Project Configuration

Once your Codecov upload token is loaded via your environment variables, you will need to add the Codecov reporting command in your test commands:

bash <(curl -s https://codecov.io/bash)

Note that this uses their universal uploader. They also provide language and framework-specific packages that you can integrate directly into your test suite if you prefer. View their language-specific documentation and examples for more specific information.