Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.


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.

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 Ruby Uploader

Codecov Gem Version Build Status Codecov FOSSA Status upload support for Ruby.

Quick Start

Add to your Gemfile:

gem 'codecov', require: false, group: 'test'

Add to the top of your tests/helper.rb file:

require 'simplecov'

require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov

Add CI Environment Variable:

CODECOV_TOKEN="your repo token"

Find you repo token on your repo page at Repo tokens are not required for public repos on Travis-Ci, CircleCI, or AppVeyor CI.

Supported CIs

AppVeyor CI
Azure Pipelines
Bitbucket Pipelines
Bitrise CI
Buildkite CI
CodeBuild CI
Circle CI
Codeship CI
Drone CI
GitLab CI
Heroku CI
Jenkins CI
Semaphore CI
Solano CI
TeamCity CI
Travis CI
Wercker CI

Advanced Usage

Submit only in CI example

if ENV['CI'] == 'true'
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov

Useful Links

FAQ Recipe List Error Reference Changelog Support Community Boards


  1. There are known issues when Simplecov.track_files is enabled. We recommend that you require all code files in your tests so that SimpleCov can provide Codecov with properly mapped coverage report metrics. codecov/support#133
  1. git must be installed.



For companies using Codecov Enterprise you will need to specify the following parameters:

CODECOV_TOKEN="repository token or global token"


FOSSA Status