Integrating Codecov with Codeship

Written by: Kelly Andrews
2 min read
Stay connected

At Codeship, we’re pleased to be able to integrate with several third-party products across a variety of areas to ensure your CI/CD workflows are that much smoother. For example, Codecov is an automated code-coverage service that helps you enforce standards of code quality and transparency with your engineering team.

Getting started 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. Let's begin with the Codeship Pro setup.

Getting Started with Codecov and Codeship Pro

First of all, 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, 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

Moving onto the Codeship Basic setup, let's begin by adding an upload token. You'll need to add your CODECOV_TOKEN 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.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.