Codecov is a new(?) Code Coverage web app supporting more languages than you can shake a stick at and apparently at a shockingly low price of $5/month for unlimited private repos. I was sold immediately.
Currently I'm using Werkcer for CI; it's in beta at the moment (and has been for aaaages). It has a few hiccups, but it's nice and simple and - hey look - free for private repos (while in beta). No word on pricing yet.
Wercker + codecov
It's dead simple, but just in case you're brain dead...
Prep for all languages
- In codecov, add your repo
- Copy the token codecov gives you
- Head to the settings page in a particular Wercker build.
- Get to the 'Pipeline' section
- Add a new environment variable, call it CODECOV_TOKEN (name will be important for Ruby)
- Paste in the token from codecov
- important check the 'Protected' checkbox so the token never appears in your Wercker logs
- Save it
I'm using tox on Python 2.7; my wercker.yml looks like this:
box: python:2.7-onbuild build: steps: - script: name: Install required libs code: | pip install tox pip install codecov - script: name: Run Tox code: | tox - script: name: Upload codecov results code: codecov --token=$CODECOV_TOKEN
Ruby requires some changes to the code but doesn't need us to touch the
werkcer.yml file so, straight from the codecov documentation, do the following:
gem 'codecov', :require => false, :group => :testto your
Add the following to your test helper file (I'm using rspec, so into
require 'simplecov' SimpleCov.start if ENV['CI']=='true' require 'codecov' SimpleCov.formatter = SimpleCov::Formatter::Codecov end