-
Notifications
You must be signed in to change notification settings - Fork 194
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
Improve CI run time #8348
Improve CI run time #8348
Conversation
619d6d6
to
6e25cef
Compare
I've got some food for thought on this: With the current implementation, MiniTest tests are manually assigned to nodes. This potentially puts us at risk of not running the full suite: if we've missed some tests, or if future tests get added to locations which lie outside of the assignment. This could be solved by randomly assigning tests across nodes, potentially resulting in a small increase in run time. The random assignment of tests would make it easier to scale up - as a node can be added without worrying about re-allocating tests across nodes - but increases complexity. Here's a draft PR to show what random test assignments would look like with 4 nodes. |
13311dc
to
6e25cef
Compare
6e25cef
to
56eaf94
Compare
this is great 🚀 One thought. If we add a new pattern etc. which uses a new directory. We would have to remember to add it to a node or the tests wouldn't run on CI right? Edit: sorry i missed this #8348 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. I wasn't expecting us to be quite so fine-grained with the unit test directories, but if this works well then I don't have any objections
891156f
to
b9f7494
Compare
This separates out the two runs done by integration tests: one with preview_design_system permissions and one without. Each is run in a separate workflow. I opted to make separate worksflows to make it easy to delete the preview_design_system workflow once fully ported over to the design system.
This configures the MiniTest workflow to run using a matrix strategy. It run separate parts of the test suite on different nodes and hence speeds up total run time of the CI/CD pipeline.
b9f7494
to
07cd144
Compare
Seems like a good approach to me. Makes me feel a lot more comfortable about us not missing tests 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
What
Trello ticket link
This PR improves the time it takes our CI tests to run by:
cucumber:ok
task and one process runs thecucumber:preview_design_system
taskBenchmark: Approximately 17m39s (average of the 10 most recent merge to main CI runs)
With the changes proposed, this PR reduces CI run time to approximately 7 minutes.
Why
This is to help reduce developer toil and time to deploy changes. The current run time is excessive and slows down development.
Additional information
Order of implementation
To avoid having a period where there are no Minitest or integration checks in our CI/CD pipeline, these changes must be implemented in the following order: