ci: split the test job in two per Node.js version

Merged
OK
7d ago
+9-3

What

The test job in spec.yml runs as two jobs per Node.js version: test:runner (@e2e-dev/core and e2e) and test:packages (every other package and the script tests). pnpm test still builds and runs both, in the same order as before.

Why

pnpm test took about 14 of the job's 15 minutes on every Node.js version, so a slightly slow runner hit the timeout. On #2224 the Node 22 and 22.22.3 jobs were cancelled at 15m00s with suites still passing, while 24, 24.8.0 and 26 finished the same commit in 14m06s to 14m57s. Runs on main were cancelled the same way.

Measured on a passing Node 22 job (run 45457600315): the e2e package's tests take about 7.3 minutes, and the build plus every other package about 5.8.

How it works

  1. package.json: test becomes build && test:runner && test:packages. The two new scripts hold the old chain cut after the e2e package, with no entry added, dropped or reordered.
  2. .github/workflows/spec.yml: the test matrix gains suite: [runner, packages], and the step runs pnpm run build && pnpm run test:<suite>. spec gate already needs test, so both halves gate merges.
  3. AGENTS.md names the two jobs.

Dropped: raising timeout-minutes. The suite keeps growing, so a higher cap is met again, and a real hang would then take longer to fail.

Cost: 10 test jobs in place of 5, each paying checkout, install, Chromium and the build (about 1.5 minutes).

Verified

Ran it locally: no - it changes CI job layout only. This PR's own spec run is the evidence: all ten test jobs passed, the slowest at 8m58s against the 15-minute cap.

Node.jsrunnerpackages
228m32s5m08s
22.22.38m43s5m28s
247m55s5m40s
24.8.08m58s8m16s
267m57s5m11s
  • A script check confirms test:runner followed by test:packages is the old test chain entry for entry.