Skip to content

chevah/codecov-python

 
 

Repository files navigation

🚨🚨 Deprecation Notice 🚨🚨

This uploader is being deprecated by the Codecov team. We recommend migrating to our new uploader as soon as possible to prevent any lapses in coverage. The new uploader is open source, and we highly encourage submitting Issues and Pull Requests.

You can visit our migration guide for help moving to our new uploader, and our blog post to learn more about our deprecation plan

On February 1, 2022 this uploader will be completely deprecated and will no longer be able to upload coverage to Codecov.

Codecov Global Python Uploader

codecov.io PyPI Code style: black FOSSA Status

Support Documentation Community Boards Twitter

Find coverage reports for all the languages below, gather them and submit them to Codecov.

Codecov Features

  • Reports are automatically combined with no extra setup. Each build is stored separately and combined.
  • Multiple languages are supported in a single upload and repository.
  • Optionally stores environment variables per build.

Usage

pip install --user codecov && codecov -t <the-repository-upload-token>

or

conda install -c conda-forge codecov && codecov -t <the-repository-upload-token>

--user argument not needed for Python projects. See example here.

Languages

Python, C#/.net, Java, Node/Javascript/Coffee, C/C++, D, Go, Groovy, Kotlin, PHP, R, Scala, Xtern, Xcode, Lua and more...

Using tox?

Codecov can be set up in your tox.ini.

Just please make sure to pass all the necessary environment variables through:

[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
deps = codecov>=1.4.0
commands = codecov -e TOXENV

See all the environment variables for other CI providers here

Configuration

Below are the most commonly used settings.

Argument Environment Description
-t CODECOV_TOKEN Private repo token for uploading
-e CODECOV_ENV List of config vars to store for the build
-F Flag this upload to group coverage reports. Ex. unittests or integration
# public repository on Travis CI
install:
  - pip install --user codecov
# or
  - conda install -c conda-forge codecov
after_success:
  - codecov
# private repository on Travis CI
install:
  - pip install codecov
# or
  - conda install -c conda-forge codecov
after_success:
  - codecov -t the-repository-upload-token

CI Providers

Company Supported Token Required
AppVeyor Yes Build status Private only
Bamboo coming soon
Buildbot coming soon buildbot/buildbot#1671
CircleCI Yes Private only
Codeship Yes Public & Private
Drone.io Yes Public & Private
GitHub Actions Yes Build status Public & Private
Gitlab CI Yes Public & Private
Jenkins Yes Public & Private
Magnum CI Yes Public & Private
Semaphore Yes Public & Private
Shippable Yes Public & Private
Solano Labs coming soon
Travis CI Yes Build Status Private only
Wercker Yes Public & Private
Cirrus CI Yes Private only
Git / Mercurial Yes (as a fallback) Public & Private

Troubleshooting

If you're seeing an HTTP 400 error when uploading reports to S3, make sure you've updated to at least version 2.1.3.

Copyright

Copyright 2014-2022 codecov

License

FOSSA Status

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.9%
  • Makefile 1.1%