Low commit activity in last 3 years
There's a lot of open issues
No release in over a year
Generate SimpleCov reports for your parallel Buildkite builds
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 13.0
~> 3.0

Runtime

~> 0.16
 Project Readme

SimpleCov::Buildkite

Gem Version Build Status

Generate Buildkite annotations from your SimpleCov coverage reports when running your build on Buildkite.

Installation

Add this line to your application's Gemfile, after simplecov:

gem "simplecov"
gem "simplecov-buildkite"

And then execute:

$ bundle

Or install it yourself as:

$ gem install simplecov-buildkite

Usage

Use it alongside your favourite formatter. For example, in Rails with RSpec, add it in your spec_helper.rb like this:

# spec/spec_helper.rb

require "simplecov"
require "simplecov-buildkite"

SimpleCov.start "rails" do
  load_profile "buildkite"

  formatter SimpleCov::Formatter::MultiFormatter.new([
    SimpleCov::Formatter::HTMLFormatter,
    SimpleCov::Buildkite::AnnotationFormatter,
  ])
end

When run on Buildkite with the "buildkite" profile enabled, this will also output a pretty Buildkite annotation, with coverage change breakdowns for the current PR or branch and commit:

Buildkite build showing a SimpleCov report in a Buildkite annotation

You can customize the title and annotation context using environment variables in your Pipeline. You can provide multiple coverage reports for a single build by providing distinct values for the annotation context.

steps:
- command: bin/rails engine1:spec
  env:
    SIMPLECOV_BUILDKITE_TITLE: "Engine 1 Coverage"
    SIMPLECOV_BUILDKITE_CONTEXT: "engine-1-coverage"

- command: bin/rails engine2:spec
  env:
    SIMPLECOV_BUILDKITE_TITLE: "Engine 2 Coverage"
    SIMPLECOV_BUILDKITE_CONTEXT: "engine-2-coverage"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite/simplecov-buildkite. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SimpleCov::Buildkite project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.