Skip to content

chore(ci): run the suite in more parallel shards - #2059

Merged
rpgmem merged 2 commits into
developfrom
claude/ci-parallel-shards
Oct 24, 2026
Merged

rpgmem merged 2 commits into
developfrom
claude/ci-parallel-shards

Conversation

@rpgmem

@rpgmem rpgmem commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Closes #2058

Problem

A CI run takes about 20 minutes. Coverage shards 2–4 take 14 to 20 minutes each. The two plain PHPUnit jobs each run the whole suite in one process, in 10 to 17 minutes. PHPUnit (PHP 8.3) repeats what the coverage shards already do: they run the same suite on PHP 8.3. Measurements are in #2058.

Change

  • Coverage: 4 → 6 shards.
  • PHP 8.4: 3 shards (PHPUnit 8.4 shard N) instead of one process.
  • PHP 8.3: the plain run is removed.
  • Required check names stay the same: PHPUnit (PHP 8.3) and PHPUnit (PHP 8.4) are now gate jobs. They report the result of their shards (the coverage shards for 8.3) and run nothing themselves, like Coverage (PHP 8.3) already did. Branch protection needs no change.
  • Integration suite included: shard-tests.php now takes both suites phpunit.xml.dist declares, so tests/Integration runs in the shards. The coverage shards used to skip it.
  • CLAUDE.md: the required-check note now names the gates and their shards.

Left alone: the LPT weighting. Locally the 4 shards were balanced (14–16 min with 4 in parallel), and the spread seen on CI is runner variance.

Tests

  • Every new shard passes locally, as a check for order dependence: 6 shards and 3 shards, both suites, 693 files, each file in exactly one shard per partition.
  • The workflow parses, and every job's needs resolves.

Risk

CI only. The new partition places files in different neighbours, so a latent order dependence could surface. The local run of every shard is there to catch it before CI does.

Checklist

  • Base is develop; no version bump
  • CHANGELOG.md — bullet at the end of Changed
  • Documentation topic — not applicable
  • Strings — none
  • Minified assets — none touched
  • Fast checks run locally

Generated by Claude Code

Coverage runs in 6 shards instead of 4 and PHP 8.4 in 3 instead of one
process. The plain PHP 8.3 run goes: the coverage shards already run
the same suite on PHP 8.3. `PHPUnit (PHP 8.3)` and `PHPUnit (PHP 8.4)`
become gate jobs that report their shards' result, so the required
check names stay and branch protection needs no change.

shard-tests.php now takes both suites phpunit.xml.dist declares, so
tests/Integration runs in the shards too.

Closes #2058

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018srx5hc431EYmG4MHUr2KA
@rpgmem
rpgmem marked this pull request as ready for review October 24, 2026 13:11
@rpgmem
rpgmem merged commit ee5bc5f into develop Oct 24, 2026
22 checks passed
@rpgmem
rpgmem deleted the claude/ci-parallel-shards branch October 24, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants