Codecov

Code coverage done right.®

Welcome to Codecov Documentation. You'll find comprehensive guides and documentation to help you start working with Codecov as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Merging Reports

No setup required. Automatic report merging for all CI and languages into a single report.

A common practice in the modern developer's workflow is to test multiple build systems, split up tests in different containers, and group tests based on test focus (unittests vs integration tests). Codecov flawlessly supports all these setups. Therefore, no setup is required.

Multiple Languages

Codecov supports multiple languages in the same repository. You may upload reports for one or more languages, and Codecov will merge the reports automatically while maintaining the original upload context.

Codecov does not override report data for multiple uploads. We always merge the data. Simply upload all three reports at once, or separately.

script:
  # run my python tests
  - coverage run tests.py
  # upload my python reports
  - bash <(curl -s https://codecov.io/bash) -cF python
  # run my javascript tests
  - npm test
  # upload my javascript reports
  - bash <(curl -s https://codecov.io/bash) -cF javascript

Delayed Notifications

Codecov will delay notifications such as Slack, Hipchat, and Pull Request Comments until all reports are uploaded and merged. This prevents posting invalid coverage metrics when the first report is uploaded.

A good example of this is pyca/cryptography, with over 20 containers uploading coverage reports to Codecov. Each container runs tests resulting in ~90% coverage. However, when Codecov merges all reports together the result is 100% coverage. Codecov will submit the notifications once it determines that CI is complete and all reports are merged. The notifications expresses 💯, a number they work hard for. Nice job pyca team! 👍 🎉

Frequently Asked Questions

How does Codecov know when to send notifications?

Codecov will check, every minute, the status of each CI provider. If the status of any provider is pending, we will delay the notifications. If the status of any provider is error or failure, Codecov will cancel the notification entirely. If the status of all providers is success, the notifications will be submitted.

Why did I not receive a notification yet?

  • If the CI status is "pending", please wait until the CI is complete.
  • If the CI status is "error" or "failed", no notifications will be submitted.
  • If CI is successful:
    • is your CI provider in the list of [[Supported CI Providers]].
    • review [[Commit Build Logs]].
    • check if the reports failed to upload to Codecov.
    • make sure your yaml is valid.

How do I remove checking a specific CI status? Answer here.


What's Next

You can group reports by applying a Flag, which comes with amazing UI additions and custom commit statuses. Learn more:

Flags

Merging Reports

No setup required. Automatic report merging for all CI and languages into a single report.