Skip to content

ci: reduce CI runtime and drop EOL Node.js versions#593

Open
hmalik88 wants to merge 11 commits into
mainfrom
hm/improve-ci
Open

ci: reduce CI runtime and drop EOL Node.js versions#593
hmalik88 wants to merge 11 commits into
mainfrom
hm/improve-ci

Conversation

@hmalik88

@hmalik88 hmalik88 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the prepare job and its needs: prepare gate from all downstream jobs
  • Consolidate validate-changelog from 16 matrix jobs to one
  • Update actions/checkout from v4 to v5
  • Drop EOL Node.js versions (18, 20, 24) and test on 22.x only; set minimum engine to >=22
  • Remove duplicate yarn constraints call from the lint script

Why

prepare was adding ~52s to every run for no reason. Every job in
build-lint-test.yml had needs: prepare, meaning nothing could start
until prepare finished. The only thing prepare produced that any job
actually consumed was a workspace package names list, used to fan out
validate-changelog into a per-package matrix. lint, build, and
test had no real dependency on it — they were blocked purely as a side
effect of the matrix design.

The validate-changelog matrix was 16 jobs for one command.
changelog:validate has no cross-package dependencies, so 16 separate
checkout+setup cycles (each ~35–40s of overhead) for a script that takes
a few seconds is pure waste. yarn workspaces foreach --all --no-private --parallel run changelog:validate does the same work in one job.
Collapsing the matrix also eliminates the need for prepare's output,
which is what makes removing prepare possible.

actions/checkout@v4 targets Node.js 20, which GitHub Actions runners
now force to run on Node.js 24, generating a deprecation annotation on
every run.

Node.js 18 and 20 are both past end-of-life (April 2025 and April
2026 respectively) and no longer receive security patches. Testing against
them provides no signal and wastes runner slots. Node 22 is Active LTS
until April 2027.

yarn constraints was running twice per CI push. The lint script
called it explicitly, and the dedicated Lint (constraints) CI job also
ran it as a separate matrix entry. Since they run in parallel there was no
wall-clock cost, but it was redundant work. Removed the call from the
lint script so it only runs in the dedicated job.

Impact

Before After
Critical path (measured) ~414s avg ~219s
validate-changelog runner slots 16 1
Test matrix entries 3 (18, 20, 22) 1 (22)
yarn constraints runs per push 2 1
Deprecation warnings yes no

About a 30% improvement, which will probably be even better when caches are warm. This should also make the range of CI times more consistent.

Test plan

  • All jobs pass on this PR's CI run
  • Wall-clock time is materially shorter than recent runs on main
  • validate-changelog catches a bad changelog entry (manual spot-check)

Note

Cursor Bugbot is generating a summary for commit 68ec507. Configure here.

@hmalik88 hmalik88 changed the title perf: improve CI performance ci: reduce CI runtime and drop EOL Node.js versions Jul 9, 2026
@hmalik88 hmalik88 marked this pull request as ready for review July 9, 2026 13:46
@hmalik88 hmalik88 requested a review from a team as a code owner July 9, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant