-
Notifications
You must be signed in to change notification settings - Fork 46
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 #979
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
Use parallel_tests in CI
Improvements for CI in GitHub Actions
Dec 10, 2024
This reverts commit 35e807b.
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 very similar to the joint PR in the starter repo. Both PRs improve the CI workflow in their respective repos.
parallel_tests
(installed in the starter repo) to not only split tests (starter repo minitest) across "physical" nodes, but also parallelize test runs on each node. We're using 4 nodes, with 4 runners per node, for a total of 16 individual runners.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 dozens of different summaries:
Now we show a single summary that includes all tests (starter repo minitest, starter repo super scaffolding test, and individual test inside each gem):
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. In the
core
repo the grouping is for the individual gems and the starter repo.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.