Create Code Coverage Reports with Codefresh and Codecov
Codefresh has native integration for Codecov analysis.
To enable the analysis sign up for a free account with Codecov and add a new project.
From this screen make sure you note down the Token as you will use it in Codefresh.
Next, go into your Codefresh account settings and choose CodeCov from integrations. Click the add integration button:
Enter the following:
- Integration name: The user-defined name for this integration. The name should be unique for each integration that you add.
- Token: The token (see the previous section) 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.
Using Codecov in a Codefresh Pipeline:
With the integration in place, you can use it by name in any Codefresh pipeline by using the Codecov reporter step.
codecov-report: stage: "prepare" title: Codecov report type: codecov-reporter arguments: codecov_integration: my-codecov-integration
For more details see our Codecov example.