Repository navigation
ci: shard the root test job - #383
Merged
Merged
Conversation
The root job ran the whole suite from source and then the whole e2e suite against the binary, in one job, and took about 17 minutes. The required check waited on it, so every PR did too. Make the user a matrix axis of the test job, so root runs the same three shards as the runner user and the shard list stays in one place. Root stays on Ubuntu. The rest shard runs the unit files and the e2e describes that need the source. The test-root job is gone. Part of #382 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
This file contains hidden or 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
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.
Part of #382
Problem
test (root)takes about 17 minutes (16.5, 16.9 and 16.7 in PR runs 40413389882, 40540925012 and 40542953264). The Ubuntu shards take about 3. The required checktest (ubuntu-latest)needs both, so every PR waits about 17 minutes.The root job runs
bun test --isolate, which is the whole suite from source with e2e included. Then it runs the whole e2e suite again against the binary. It is one unsharded job.Change
The user is now a matrix axis of the
testjob (runnerandroot), so root runs the same three shards as everyone else and the shard list stays in one place. Thetest-rootjob is gone. Job names gain the user, for exampletest (ubuntu-latest, root, fork).restshard also runs from source the unit files and the e2e describes that skip underPATCHBOOK_CMD, selected by--test-name-pattern "so only from source". That is 12 tests: 8 in "init stopped by a preload" and 4 in "killed by a preload" under VendorTest. They now also run as the runner user. Before, they ran only as root, and never on macOS.requiredkeeps the nametest (ubuntu-latest)and needs onlytest.permissionTeststill fails as root.Verification
CI wall time on a PR, from real runs:
test (root), 16.5 to 16.9 mintest (ubuntu-latest, runner, rest), 3.1 minactionlint1.7.12, without shellcheck, reports nothing. The expanded matrix has 6 jobs forpull_requestand 9 forpush.so only from sourcepattern runs exactly the 12 tests in the two describes that skip underPATCHBOOK_CMD. A zero-match pattern makesbun testexit 1, so renaming those describes fails the job.skipIfdescribe as skipped even when the name pattern filters them out. That is why root jobs print more skips than runner jobs. The pass counts are what to compare.Written with Claude Sonnet 5.5 in Claude Code
🤖 Generated with Claude Code