A simplecov formatter that generates a shields.io badge and uploads to gh-pages
Add to your
Gemfile
group :test do
gem 'simplecov-shields-badge', require: false
end
Add to your README.md
[![Coverage](https://USERNAME.github.io/REPO/badge.svg)](https://github.com/USERNAME/REPO)
Add to the top of your
tests/helper.rb
file
require 'simplecov'
SimpleCov.start
require 'shields_badge'
SimpleCov.formatter = SimpleCov::Formatter::ShieldsBadge
In your CI Environment Variables
GITHUB_USER="a github username"
GITHUB_MAIL="github user email"
GITHUB_ORG="github organization or username"
GITHUB_REPO="github repo name"
GITHUB_ACCESS_TOKEN="github access token with commit permission"