ci(web): run the webview tests in four shards instead of two

Closed
TE
17d ago
+12-5

The webview test step sets how long react-apps-check takes, and nearly all of that step goes to the Vite dev server files. scripts/ci/run-webviews-tests.sh runs those CMUX_WEB_TEST_DEV_JOBS at a time, which is 2 on the 8 vCPU runner.

Measured on job 117948581151, react-apps-check (2) at two shards:

  • Test step: 1,058 s. Its 136 other files were all done 20 s in, and the remaining 1,037 s went to 65 dev server files.
  • The sibling shard took 777 s.

With four shards, each gets 28 to 34 dev server files instead of 58 to 64 (round robin over the git-index list, same split rule). The test step on the critical path should drop to about half, roughly 550 s, and the whole job from about 19.5 min to about 11 min. The per-shard fixed cost (about 110 s for setup, the bundle build and the engine install) now runs four times instead of twice on free Blacksmith runners.

Only the matrix changed. The aggregate react-apps-check gate, the per-file isolation, the warmers and the PR-scoped check on shard 1 are unchanged.

Observed / Not run

  • Measured the step timeline from the job log of 117948581151 and the per-shard split from git ls-files with the script's own dev-server pattern.
  • This PR's own run is the first four-shard timing. I'll add it here when it lands.

Changelog

none

๐Ÿค– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Runs the webview tests in four shards instead of two, roughly halving the react-apps-check critical path.

Nearly all of a shard's test step goes to its Vite dev server files, which run two at a time on the 8 vCPU runner: shard 2 in job 117948581151 spent 1,037 of its 1,058 s there while its other 136 files finished in 20 s. Four shards give each 28โ€“34 dev server files instead of 58โ€“64, so the test step should drop to about 550 s and the whole job from ~19.5 to ~11 min. The tradeoff is that per-shard setup, bundle build, and engine install now run four times instead of twice.

Only the workflow matrix changed; the aggregate gate, per-file isolation, warmers, and PR-scoped check on shard 1 are unchanged.