Upload reports to Codecov for almost every supported language.
SHA1Sum: hash file
# All CI
bash <(curl -s https://codecov.io/bash)
# Pipe to bash (Jenkins)
curl -s https://codecov.io/bash | bash -s - -t token
# ^ add your extra config here
# No bash method
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
./.codecovCodecov supports many languages, you can find a full list here: https://docs.codecov.io/docs/supported-languages
Below are most commonly used settings. View full list of commands to see the full list of commands.
# public repo on Travis CI
after_success:
- bash <(curl -s https://codecov.io/bash)# private repo
after_success:
- bash <(curl -s https://codecov.io/bash) -t your-repository-upload-token# Flag build types
after_success:
- bash <(curl -s https://codecov.io/bash) -F unittests# Include environment variables to store per build
after_success:
- bash <(curl -s https://codecov.io/bash) -e TOX_ENV,CUSTOM_VARWhen running the codecov-bash uploader on Alpine Linux, you are likely to run into a parsing issue because of the default shell. To be able to upload reports, you need to issue the following commands.
after_success:
- apk -U add git curl bash findutils
- bash -c '/bin/bash <(curl -s https://codecov.io/bash)'If Codecov fails to upload reports, you can ensure the CI build does not fail by adding a catch-all:
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
| Company | Supported | Token Required |
|---|---|---|
| Travis CI | Yes |
Private only |
| Azure Pipelines | Yes | Private only |
| CircleCI | Yes | Private only |
| Codeship | Yes | Public & Private |
| Jenkins | Yes | Public & Private |
| Semaphore | Yes | Public & Private |
| TeamCity. | Yes | Public & Private |
| drone.io | Yes | Public & Private |
| AppVeyor | Yes | Private only |
| Bamboo | Yes | Public & Private |
| Bitbucket | Yes | Public & Private |
| Bitrise | Yes | Public & Private |
| buddybuild | Yes | Public & Private |
| Buildkite | Yes | Public & Private |
| Heroku | Yes | Public & Private |
| Wercker | Yes | Public & Private |
| Shippable | Yes | Public & Private |
| Gitlab CI | Yes | Public & Private |
| Buildkite | Yes | Public & Private |
| GitHub Actions | Yes | Private only |
| Cirrus CI | Yes | Public & Private |
| AWS CodeBuild | Yes | Public & Private |
| git | Yes (as a fallback) | Public & Private |
- Jenkins: Unable to find reports? Try
PWD=WORKSPACE bash <(curl -s https://codecov.io/bash)
To automatically update the hash files after a change to the Codecov uploader script, run
./install.sh
which will add the pre-commit hooks. You can also update the hash files manually via:
for i in 1 256 512; do shasum -a "${i}" codecov > "SHA${i}SUM"; doneand add the change to your pull request.