simplecov-ruby / simplecov

Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleCov does not fail for low coverage for parallel_tests when using 1 process

vdbijl opened this issue · comments

commented

Introduction

We use parallel_tests, rspec and simplecov.
For stability we use 1 process in our build with the setup below. When we only use 1 process, SimpleCov does not fail on low coverage. When we use more than 1 process, everything works as expected.

Is this a known problem, or am I doing something wrong?

Code setup

task :regular_specs do
  parallel_test_processors = 1

  coverage_minimum = 100
  #` We use ENV['RSPEC_COVERAGE'] in setting SimpleCov.minimum_coverage
  ENV['RSPEC_COVERAGE'] ||= coverage_minimum.to_s

  Rake::Task['parallel:spec'].invoke(parallel_test_processors)
  # Re-enable task, to enable other parallel:specs such as system_specs
  Rake::Task['parallel:spec'].reenable
end