Skip to content

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

@vdbijl

Description

@vdbijl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions