increments / simplecov-parallel

Parallelism support for SimpleCov, currently only for CircleCI 1.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Ruby 99.3%Language:Shell 0.7%