Skip to content

feat(playwright-test): shard the e2e suite across runner pods - #74

Merged
cshuttle merged 1 commit into
mainfrom
playwright-shards
Oct 4, 2026
Merged

cshuttle merged 1 commit into
mainfrom
playwright-shards

Conversation

@cshuttle

@cshuttle cshuttle commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Adds a shards input (default 1, max 10) to playwright-test.yml:

  • The e2e step runs as a matrix of that many jobs, each with SHARD=<n>/<total> for the caller to pass as --shard=$SHARD.
  • The unit suite runs on shard 1 only.
  • fail-fast is off, so every shard reports.
  • Failure reports upload under per-shard names.

No change for existing callers. With shards: 1, the job keeps its plain test name and runs exactly as before.

Guard: shards > 1 with an e2e command that lacks $SHARD fails in lockstep, 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

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>
@cshuttle
cshuttle merged commit 6a18931 into main Oct 4, 2026
13 checks passed
@cshuttle
cshuttle deleted the playwright-shards branch October 4, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant