Disable RSpec option filter focus and run_all_when_everything_filtered on CI [RUN ALL RSPEC]
What does this MR do?
Disable RSpec run_all_when_everything_filtered
and filter_run focus: true
when on CI.
With the run_all_when_everything_filtered
configuration set to true (before this MR), it runs all tests when nothing matches the tag:
$ bundle exec rspec spec/lib/gitlab/ci/pipeline/expression/lexeme/and_spec.rb --tag foo
Run options: include {:focus=>true, :foo=>true}
All examples were filtered out; ignoring {:focus=>true, :foo=>true}
..........................
Finished in 0.02526 seconds (files took 3.76 seconds to load)
26 examples, 0 failures
With the configuration set to false, it does not run any tests when nothing matches the tag:
$ bundle exec rspec spec/lib/gitlab/ci/pipeline/expression/lexeme/and_spec.rb --tag foo
Run options: include {:focus=>true, :foo=>true}
All examples were filtered out
Finished in 0.00024 seconds (files took 3.73 seconds to load)
0 examples, 0 failures
Removing run_all_when_everything_filtered
also requires filter_run focus: true
to be removed. Otherwise, it will not run anything.
Fixes #294212 (closed)
Edited by Albert