-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Improvements for CI in GitHub Actions #1787
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jagthedrummer
changed the title
Try using
Improvements for CI in GitHub Actions
Dec 5, 2024
parallel_tests
to split test files in CI
jagthedrummer
force-pushed
the
jeremy/parallel_tests
branch
from
December 6, 2024 21:43
1d1ba82
to
b562430
Compare
This was referenced Dec 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is similar to the joint PR in the
core
repo`. Both PRs improve the CI workflow in their respective repos.parallel_tests
gem to split tests in CI instead of a custom script we were using previously.parallel_tests
to not only split tests across "physical" nodes, but also parallelize test runs on each node. We default to 4 nodes, with 4 runners per node, for a total of 16 individual runners. In private repos we only do 2 runners per node (because private repos only get 2 CPU cores per node), for a total of 8 individual runners. Number of nodes and number of runners per node are configurable in the workflow.runtime
grouping option ofparallel_tests
to create test groups that should run in about the same amount of time. Previously we used random grouping and so sometimes one runner would end up with a bunch of slow tests and run times would be fairly uneven.bullet-train-co/parallel-test-dynamic-matrix
action to dynamically construct the matrix of test runners based on the configuration (or defaults) mentioned above. This makes it much less fiddly and error prone to configure whatever parallelization you want.standardrb/standard-ruby-action
instead of runningstandardrb
manually. Using the official action makes it so that any linting failures are added as annotations to the workflow.Before we would show 4 different summaries:
Now we show a single summary that includes all tests:
When there are test failures they are collected and all reported together instead of being spread across the different summaries:
simplecov
to generate data about test coverage. We use workflow artifacts to save coverage data from each test node, and then a later workflow combines the coverage data and generates a summary. The summary includes expandable sections. One that shows coverage data for the top 10 least covered files, and another that show coverage by groups.The summary also includes a link to a downloadable coverage report. After downloading the report you can open it in your browser to get the full picture of the coverage situation.
The
🚅 _ BT - Internal CI
workflow got a similar update.