spec_helper: tweak parallel tests handling.

- only hide filtered runs in parallel (where they are super noisy)
- only send SimpleCov coverage once to Coveralls
This commit is contained in:
Mike McQuaid 2019-01-09 18:59:12 +00:00
parent 04b020d090
commit 3c270b3a9a
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -11,6 +11,13 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
formatters << Coveralls::SimpleCov::Formatter
if ENV["TEST_ENV_NUMBER"]
SimpleCov.at_exit do
result = SimpleCov.result
result.format! if ParallelTests.number_of_running_processes <= 1
end
end
ENV["CI_NAME"] = ENV["HOMEBREW_CI_NAME"]
ENV["CI_JOB_ID"] = ENV["TEST_ENV_NUMBER"] || "1"
ENV["CI_BUILD_NUMBER"] = ENV["HOMEBREW_CI_BUILD_NUMBER"]
@ -65,7 +72,7 @@ RSpec.configure do |config|
config.filter_run_when_matching :focus
config.silence_filter_announcements = true
config.silence_filter_announcements = true if ENV["TEST_ENV_NUMBER"]
# TODO: when https://github.com/rspec/rspec-expectations/pull/1056
# makes it into a stable release: