Codecov Ruby Uploader
DEPRECATION WARNING
All versions of the Ruby uploader prior to 0.2.0
will no longer be supported
and will be removed from public use on or after 2020-08-17.
Please upgrade to the latest versions to continue using this uploader.
Codecov.io 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' SimpleCov.start 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 codecov.io.
Repo tokens are not required for public repos on Travis-Ci, CircleCI, or AppVeyor CI.
Supported CIs
Advanced Usage
Submit only in CI example
if ENV['CI'] == 'true' require 'codecov' SimpleCov.formatter = SimpleCov::Formatter::Codecov end
Useful Links
FAQ
Recipe List
Error Reference
Changelog
Support
Community Boards
Caveats
- 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 git
must be installed.
Maintainers
Enterprise
For companies using Codecov Enterprise you will need to specify the following parameters:
CODECOV_URL="https://codecov.mycompany.com" CODECOV_SLUG="owner/repo" CODECOV_TOKEN="repository token or global token"