feat(playwright-test): shard the e2e suite across runner pods - #74
Merged
Merged
Conversation
A new shards input (default 1) runs the e2e command as a matrix of that many jobs, each with SHARD=<n>/<total> in its environment for the caller to pass as --shard=$SHARD. The unit suite runs on shard 1 only; every shard reports (fail-fast off) and uploads its own report on failure. With shards: 1 the job keeps its plain 'test' name and runs exactly as before, so no caller changes. A command that shards without passing $SHARD fails in lockstep, before any pod is spent, instead of running the whole suite N times. Motivated by nmon: 543 tests take 3.3 min on one pod, and run twice per change (PR and main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds a
shardsinput (default 1, max 10) toplaywright-test.yml:SHARD=<n>/<total>for the caller to pass as--shard=$SHARD.fail-fastis off, so every shard reports.No change for existing callers. With
shards: 1, the job keeps its plaintestname and runs exactly as before.Guard:
shards > 1with an e2e command that lacks$SHARDfails inlockstep, before any pod is spent, instead of running the whole suite N times.Why: nmon's 543 tests take 3.3 min on one pod and run twice per change. Proven live on cshuttle/nmon's draft PR, which points at this branch's commit. Release as v1.11.0 (new capability, minor).
actionlint is clean on the changed file.
🤖 Generated with Claude Code