Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Parallelism support for SimpleCov, currently only for CircleCI 1.0

License

Notifications You must be signed in to change notification settings

increments/simplecov-parallel

Repository files navigation

Gem Version Dependency Status CircleCI Code Climate

SimpleCov::Parallel

SimpleCov::Parallel is a SimpleCov extension for parallelism support. It automatically transfers each node coverage data to a single master node and merges the data. Currently only CircleCI parallelism is supported.

Installation

Add these lines to your application's Gemfile:

gem 'simplecov-parallel'

And then execute:

$ bundle install

Usage

You just need to invoke SimpleCov::Parallel.activate before start tracking coverage:

# spec/spec_helper.rb
require 'simplecov/parallel'
SimpleCov::Parallel.activate
SimpleCov.start

SimpleCov::Parallel automatically detects the best parallelism support for the current environment.

You can use any formatter transparently since SimpleCov::Parallel merges the results into SimpleCov.result, which is a basic API of SimpleCov.

CircleCI

When using SimpleCov::Parallel on CircleCI:

# circle.yml
test:
  override:
    - bundle exec rspec:
        parallel: true
        files:
          - spec/**/*_spec.rb

The SimpleCov formatter will be executed only on the first node (where CIRCLE_NODE_INDEX is 0).

License

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

About

Parallelism support for SimpleCov, currently only for CircleCI 1.0

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published