Skip to content

perf(ci): Increase Jest shards from 4 to 8 for faster CI#114388

Merged
NicoHinderling merged 1 commit intomasterfrom
perf/jest-8-shards
Apr 30, 2026
Merged

perf(ci): Increase Jest shards from 4 to 8 for faster CI#114388
NicoHinderling merged 1 commit intomasterfrom
perf/jest-8-shards

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

Increase Jest CI shards from 4 to 8 to reduce wall-clock time for frontend tests.

Current state: 4 shards run ~6-8 minutes each, with the slowest shard (typically shard 3) bottlenecking at ~7-8 min wall clock. Total test execution across all shards sums to ~25 minutes.

With 8 shards, each shard runs ~3 min of tests + ~22s setup overhead, cutting wall clock from ~8min to ~4min. Compute cost stays roughly the same (8×4min ≈ 4×8min), with minor additional overhead from 4 extra checkout/setup steps.

Also fixes a bug in jest.config.ts where the round-robin leftover distribution was hardcoded to i % 4 instead of i % nodeTotal, which would have caused imbalanced shard assignment with any non-4 shard count.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 29, 2026
@NicoHinderling NicoHinderling marked this pull request as ready for review April 29, 2026 23:04
@NicoHinderling NicoHinderling requested a review from a team as a code owner April 29, 2026 23:04
@NicoHinderling NicoHinderling merged commit 66205ea into master Apr 30, 2026
70 checks passed
@NicoHinderling NicoHinderling deleted the perf/jest-8-shards branch April 30, 2026 16:12
@NicoHinderling
Copy link
Copy Markdown
Contributor Author

seems very low risk, merging to test

cleptric pushed a commit that referenced this pull request May 5, 2026
Increase Jest CI shards from 4 to 8 to reduce wall-clock time for
frontend tests.

Current state: 4 shards run ~6-8 minutes each, with the slowest shard
(typically shard 3) bottlenecking at ~7-8 min wall clock. Total test
execution across all shards sums to ~25 minutes.

With 8 shards, each shard runs ~3 min of tests + ~22s setup overhead,
cutting wall clock from ~8min to ~4min. Compute cost stays roughly the
same (8×4min ≈ 4×8min), with minor additional overhead from 4 extra
checkout/setup steps.

Also fixes a bug in `jest.config.ts` where the round-robin leftover
distribution was hardcoded to `i % 4` instead of `i % nodeTotal`, which
would have caused imbalanced shard assignment with any non-4 shard
count.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants