CI: Skip testing factory creations in predictive and fail-fast jobs
What does this MR do and why?
This speeds up testing ee/spec/models/factories_spec.rb
in a
predictive or "fail-fast" CI job. The full spec is still run after
approval, merge, and in scheduled pipelines.
Contributes to gitlab-org/quality/engineering-productivity/team#436 (closed) and #436420 (closed).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to verify on CI?
# [RSpecRunTime] Finishing example group ee/spec/models/factories_spec.rb. It took 2 minutes 47.8 seconds. Expected to take 17 minutes 23.89 seconds.
How to set up and validate locally
CI_JOB_NAME="x fast-fail" bin/rspec ee/spec/models/factories_spec.rb
CI_JOB_NAME="x predictive" bin/rspec ee/spec/models/factories_spec.rb
...
Finished in 1 minute 56.09 seconds (files took 29.23 seconds to load)
984 examples, 0 failures, 39 pending
So, it's ~2 minutes instead of ~40 minutes.
Edited by Peter Leitzen