• This repository has been archived on 11/Jan/2023
  • Stars
    star
    231
  • Rank 167,579 (Top 4 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Global coverage report uploader for Codecov

⚠️ Deprecation Warning ⚠️

On February 1, 2022, this uploader will be fully sunset and no longer function

We recommend all users migrate to the uploader to prevent any breakages in usage. You can learn more about our deprecation plan and the new uploader on our blog.


Codecov Bash Uploader

Upload reports to Codecov for almost every supported language.

codecov

Deployed Version

Running the bash uploader


# 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
./.codecov

⚠️ Verifying the bash uploader

As an additional layer of security, users may wish to check the script against the provided SHASUMs.

curl -fLso codecov https://codecov.io/bash;
VERSION=$(grep -o 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
  shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM")
done
./codecov

or for older versions of shasum

curl -fLso codecov https://codecov.io/bash;
VERSION=$(grep -o 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
  shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
done
./codecov

Languages

Codecov supports many languages, you can find a full list here: https://docs.codecov.io/docs/supported-languages

Other Usage

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_VAR

When 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)'

Prevent build failures

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"

CI Providers

Company Supported Token Required
Travis CI Yes Build Status FOSSA Status 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

Caveats

  1. Jenkins: Unable to find reports? Try PWD=WORKSPACE bash <(curl -s https://codecov.io/bash)

Development

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"; done

and add the change to your pull request.

License

FOSSA Status

More Repositories

1

codecov-action

GitHub Action that uploads coverage to Codecov ☂️
TypeScript
1,391
star
2

self-hosted

Example of how to setup Codecov with docker compose
Shell
379
star
3

example-python

Python coverage example
Python
299
star
4

codecov-node

Global coverage report uploader for Codecov in NodeJS
JavaScript
291
star
5

browser-extension

Codecov Browser Extension
JavaScript
212
star
6

example-go

Go coverage example
Go
210
star
7

codecov-api

Code for the API of Codecov
Python
206
star
8

example-node

Example repo for uploading reports to Codecov
JavaScript
191
star
9

codecov-python

Python report uploader for Codecov
Python
184
star
10

example-android

Android code coverage example with https://codecov.io
Java
144
star
11

example-cpp11-cmake

CMake
143
star
12

example-swift

Codecov: Swift coverage example
Swift
127
star
13

example-csharp

Codecov: C# example repository
C#
115
star
14

timestring

Making time easier since "Jan 17th, 2013 at 3:59pm"
Python
101
star
15

uploader

Codecov's universal binary uploader.
TypeScript
101
star
16

example-rust

Rust
87
star
17

example-php

PHP coverage example
PHP
86
star
18

example-java-gradle

Java
84
star
19

sourcegraph-codecov

See code coverage information from Codecov on GitHub, Sourcegraph, and other tools.
TypeScript
74
star
20

codecov-ruby

Ruby uploader for Codecov
Ruby
70
star
21

example-java

Java Example
69
star
22

example-java-maven

Java
54
star
23

example-bash

Codecov: Bash/Shell coverage example
Ruby
50
star
24

example-typescript

Example repo for uploading reports to Codecov https://codecov.io
TypeScript
47
star
25

worker

Code for Background Workers of Codecov
Python
45
star
26

codecov-cli

Codecov's Command Line Interface. Used for uploading to Codecov in your CI, Test Labelling, Local Upload, and more
Python
43
star
27

gazebo

React SPA
TypeScript
42
star
28

example-scala

Scala coverage example
Scala
35
star
29

example-c

Upload reports to Codecov using C/C++
C
34
star
30

feedback

A place to discuss feedback about the pull request and web product experience.
33
star
31

dart

Codecov Dart coverage report uploader
Dart
29
star
32

codecov-browser-extension

A browser extension for Codecov. Works for Chrome and Firefox
TypeScript
29
star
33

opentelem-laravel

A WIP exporter for Laravel to capture and export opentelem data.
PHP
28
star
34

codecov-exe

.exe report uploader for Codecov https://codecov.io
C#
25
star
35

example-objc

Codecov example for Xcode
Objective-C
25
star
36

example-fortran

Example repo for uploading reports to Codecov
Fortran
22
star
37

example-perl

Perl
22
star
38

example-kotlin

Kotlin coverage example
Kotlin
21
star
39

example-ruby

Ruby coverage example
Ruby
20
star
40

swift-standard

Codecov coverage standard for Swift
Swift
19
star
41

codecov-circleci-orb

Shell
18
star
42

example-r

R
17
star
43

example-elixir

Elixir
15
star
44

codecov-perl

Backend for Codecov reporting of coverage
Perl
14
star
45

example-clojure

Example Clojure integration with Codecov
Clojure
14
star
46

contributing

14
star
47

go-standard

Codecov coverage standard for go
Python
13
star
48

shared

Shared code between worker and api
Python
13
star
49

python-standard

Codecov coverage standard for Python
Python
13
star
50

example-vala

Vala
12
star
51

cf-flags-demo

A demo of Codecov's carryforward flags feature.
Python
12
star
52

example-julia

Julia
11
star
53

example-d

Example repository for D and Codecov
D
10
star
54

java-standard

Codecov coverage standard for Java
Python
9
star
55

kotlin-standard

Codecov coverage standard for Kotlin
Kotlin
8
star
56

typescript-standard

Codecov coverage standard for TypeScript
JavaScript
8
star
57

cpp-11-standard

Codecov coverage standard for c++ 11
C++
7
star
58

example-groovy

Groovy coverage example
Groovy
7
star
59

example-lua

Shell
7
star
60

standards

List of Codecov language standards
C++
7
star
61

vscode

A Codecov vscode extention which helps validate and configure new repositories.
Python
6
star
62

helm-charts

Public Helm Charts
6
star
63

example-fsharp

Example of codecov in fsharp
F#
6
star
64

example-actions-bundled

Python
5
star
65

codecov-demo-full

JavaScript
5
star
66

codecov-racket

Codecov support for Cover.
Racket
5
star
67

opentelem-node

A WIP OpenTelemetry Exporter for Runtime Insights
JavaScript
4
star
68

example-erlang

Erlang
4
star
69

example-cpp

4
star
70

media

Press and marketing resources
3
star
71

example-xtend

Xtend coverage example
Xtend
3
star
72

example-scala-maven

Scala via Maven coverage example
Scala
3
star
73

ruby-standard-2

Codecov coverage standard for Ruby using Codecov's Bash uploader
Ruby
3
star
74

nginx

Dockerfile
3
star
75

example-haskell

3
star
76

example-delphi

2
star
77

ruby-standard-1

Codecov coverage standard for Ruby using the Codecov gem
Ruby
2
star
78

example-csharp-sharpcover

C#
2
star
79

example-kotlin-flat

Kotlin codecov example with standard file structure
Kotlin
2
star
80

opentelem-python

Open Telemetry Python Prototype
Python
2
star
81

codecov-javascript-bundler-plugins

Set of bundler plugins that allow users to upload bundle stats to Codecov.
TypeScript
2
star
82

codecov-bitrise

Shell
1
star
83

node-static-alpine

Internal Node builder for the Alpine version of the uploader
1
star
84

example-gradle-multiproject

Java
1
star
85

example-java-ant

1
star
86

impact-analysis-example-laravel

An example repository demonstrating runtime insights with Laravel
PHP
1
star
87

xcode-poc

Swift
1
star
88

ci-repo

debug and ci only
Python
1
star
89

prometheus

Shell
1
star
90

impact-analysis-example-ruby

Ruby
1
star
91

example-javascript

JavaScript
1
star
92

codecov-ats

GitHub Action that uploads returns selected test labels to CI ☂️
Shell
1
star
93

.github

Community Health Files for the Codecov Organization
1
star
94

engineering-team

This is a general repo to use with GH Projects
1
star
95

grafana

Dockerfile
1
star
96

node-alpine-static

Builds a fully static copy of NodeJS from source to be used by codecov/uploader
1
star
97

codecov-interview-api

Python
1
star
98

example-azure-pipelines

Azure Pipelines coverage example
Python
1
star
99

fork-test

Python
1
star
100

impact-analysis-example-python

HTML
1
star