Codecov pipeline integration
Create Code Coverage Reports with Codefresh and Codecov
Codefresh has native integration for Codecov analysis. You need to first set up a new project in Codecov.
Set up a new project in Codecov
- Sign up for a free account with Codecov.
- Add a new project.
- Note down the Token as you will need it to set up the Codecov integration in Codefresh.
Set up Codecov integration in Codefresh
- In the Codefresh UI, on the toolbar, click the Settings icon, and then from the sidebar, select Pipeline Integrations.
- Select Codecov and then click Configure.
- Click Add Codecov.
- Define the following:
- Integration Name: Enter a name for the integration which is used to reference it in
codefresh.yaml
. - Token: Paste the token that you copied when you created the new Codecov project for this integration.
- Url: The base URL for this integration. Do not add the trailing slash to the URL definition. For more information, see the official Codecov documentation.
- Integration Name: Enter a name for the integration which is used to reference it in
Using Codecov in a CI pipeline
With the integration in place, you can reference it by name in any Codefresh pipeline by using the Codecov reporter step.
codefresh.yml
codecov-report:
stage: "prepare"
title: Codecov report
type: codecov-reporter
arguments:
codecov_integration: my-codecov-integration
For more details see our Codecov example.
Related articles
Integration Tests
Service containers in pipelines
Coveralls coverage reports example
Codacy coverage reports example
Creating test reports