Skip to main content

CodeCov

Scorecards

Summary

Codecov monitors code coverage in your application. You can use Codecov to drive insights into values such as:

  • Code coverage
  • Static analysis
  • Code quality

Setup

In order to connect Cortex to your Codecov instance, you’ll need to create a Codecov API Token, and add it under Settings → Codecov.

caution

If you do not see the Settings page you're looking for in the sidebar, you likely don't have the proper permissions and need to contact your admin.

Registration

Discovery

By default, Cortex will use the git repository (e.g. GitHub repo) as the "best guess" for the corresponding Codecov project, since Codecov projects are connected to repositories. For example, if the GitHub repo is my-org/repo, then the project in Codecov should also be associated with my-org/repo.

If the Codecov project you want to associate isn't the same as the repository, you can override this in the Cortex Catalog Descriptor.

Catalog Descriptor

If you need to override the automatic discovery, you can define the following block in your Cortex Catalog Descriptor.

x-cortex-static-analysis:
codecov:
repo: my-project # git repo, with org and repo name
provider: GITHUB | GITLAB | BITBUCKET # select one of the three options

The value for repo should be the full repository since Codecov maps projects by the git repo.