You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, shipping a single feature ends up triggering the full
cross-platform test matrix roughly four times — once on the feature PR,
once on the `main` merge, once on the release-please PR, and once more
on the release merge.
That's ~200+ jobs per released feature, most of them duplicating work
that had already passed on a parent commit.
Combined with the slower and flakier Windows runners, the feedback loop
on PRs had grown long and noisy, and the release workflow was spending a
lot of CI time re-verifying code that was already green.
This PR restructures when and where tests run across the development
lifecycle so that we only pay for the coverage that actually tells us
something new.
## Problems this fixes
- **Redundant test runs across the release lifecycle.** The same commit
was being tested on the PR, on the `main` push after merge, on the
release PR, on the release merge, and again inside the publish job. We
now test each commit at most twice (feature PR + release PR), and the
publish job trusts the green release PR instead of re-running E2E.
- **Slow feedback on feature PRs.** Every PR had to wait for the full 3
OS × 3 Node matrix across unit, integration (sharded 4 ways), and E2E —
while most issues are catchable on Linux alone. Feature PRs now run
Linux-only, trading a small amount of platform coverage at PR time for
dramatically faster iteration.
- **Flaky Windows E2E gating every PR.** Windows-specific flakiness was
a common reason PRs got stuck. Windows (and macOS) now only run on
release PRs and on the nightly schedule — they're still part of our
safety net, just moved to where their cost is acceptable.
- **A broken release-PR filter.** The existing `!release-please--**`
filter in the test workflows was targeting the PR base branch and
therefore never actually skipped anything. Fixed by detecting
release-please PRs via `github.head_ref` and using that to switch matrix
strategies.
- **Docs-only PRs running the full test suite.** Added a `paths-filter`
step so changes that only touch markdown, LICENSE, and template files
skip the test jobs entirely.
- **Hardcoded Node versions scattered across eleven workflow files.**
Bumping Node versions used to mean edits in many places with
inconsistencies creeping in (e.g. `22.x` vs `22`). Consolidated into a
single config file (see below).
## When each workflow now runs
### Unit, Integration, E2E tests
| Trigger | Matrix |
|---|---|
| Feature PR | Ubuntu × 3 Node versions |
| Release-please PR | Ubuntu × 3 Node versions + macOS/Windows on
primary Node |
| Nightly schedule (E2E only) | Full matrix (same as release PR) |
| Push to `main` | **Not run** — the PR already tested this commit |
| Publish job | **Not run** — the release PR already tested this commit
|
If a PR only changes documentation (markdown, LICENSE, issue/PR
templates, Vale config), the test jobs are skipped and a lightweight
status check passes, so required checks still resolve.
### Release pipeline
- **Feature PR merges to `main`** → no test run. Release-please opens or
updates the release PR.
- **Release-please PR** → runs the *full* cross-platform matrix as the
last line of defense.
- **Release-please PR merges** → publish job builds and publishes
without re-running E2E. It trusts the release PR's checks.
### Single-version workflows (lint, typecheck, format, verify-docs,
benchmark, pre-release, release publish)
Same triggers as before. Each now reads its Node version from the shared
config rather than hardcoding `'24'`.
## Practical implications
- **Faster PR feedback.** Feature PRs now run roughly one-third of the
jobs they used to. The mean wait-for-CI should drop significantly, and
Windows flakes no longer block unrelated work.
- **A new tradeoff.** Because Windows/macOS aren't tested on every
feature PR, a platform-specific regression can slip through to the
release PR. The expectation is that this is rare and cheap to fix — but
the first few times it happens, the follow-up is a small PR rather than
a blocked release.
- **Release PR is now genuinely the final gate.** If its checks are
green, the publish job will ship without re-testing. Do not merge the
release PR if anything in that matrix is failing or was manually
bypassed.
## Centralized source of truth: `.github/test-matrix.yml`
All Node versions and cross-platform OS lists are now declared once, in
a short YAML config file at `.github/test-matrix.yml`. Each key has a
comment explaining what it drives and which workflows consume it. The
three fields are:
- `node_versions` — the list of Node versions that run on Linux in every
PR.
- `extra_oses_on_release` — the additional operating systems added on
release PRs and on the nightly E2E schedule.
- `primary_node_version` — the single "primary" Node version used both
for the extra OSes in the release matrix and as the pinned version in
every single-version workflow (lint, typecheck, publish, etc.).
Each workflow reads this file at run time via `yq` (pre-installed on
GitHub-hosted Ubuntu runners). To add or drop a Node version, or to
rotate the primary version, edit this one file — no workflow changes
required.
0 commit comments