ci: split the test job in two per Node.js version
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
package.json:testbecomesbuild && test:runner && test:packages. The two new scripts hold the old chain cut after thee2epackage, with no entry added, dropped or reordered..github/workflows/spec.yml: thetestmatrix gainssuite: [runner, packages], and the step runspnpm run build && pnpm run test:<suite>.spec gatealready needstest, so both halves gate merges.AGENTS.mdnames 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.js | runner | packages |
|---|---|---|
| 22 | 8m32s | 5m08s |
| 22.22.3 | 8m43s | 5m28s |
| 24 | 7m55s | 5m40s |
| 24.8.0 | 8m58s | 8m16s |
| 26 | 7m57s | 5m11s |
- A script check confirms
test:runnerfollowed bytest:packagesis the oldtestchain entry for entry.