Run jest jobs earlier by separating out slow fixture-using specs
What does this MR do and why?
This MR separates jest specs that depend on fixtures into a separate jest-with-fixtures
job. These specs require both compile-test-assets
and after it rspec-all frontend_fixture
to complete, which takes up to 10 minutes in ideal conditions. (See example, empty MR pipeline: https://gitlab.com/gitlab-org/gitlab/-/pipelines/1299053436/)
Thanks to this fact, this MR moves the majority of specs to run after jest-build-cache
has finished. That reduces the time from pipeline start to potential test failure (failing fast) and can speed up the overall pipeline when pipeline:run-all-jest is set.
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.
Screenshots or screen recordings
Jest specs that don’t need fixtures can run after jest-build-cache
. Those that do need fixtures run after fixtures are generated in jest-slow
.
As far as the pipeline timing goes:
Before | After |
---|---|