Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vdbijl opened this issue Aug 18, 2023 · 0 comments

Comments

@vdbijl
Copy link

vdbijl commented Aug 18, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant