Skip to content

ci: parallelize quality jobs and add turbo cache - #264

Merged
h4yfans merged 1 commit into
mainfrom
ci/parallelize-quality-jobs
Apr 17, 2026
Merged

ci: parallelize quality jobs and add turbo cache#264
h4yfans merged 1 commit into
mainfrom
ci/parallelize-quality-jobs

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

What

Refactor the CI Lint, Typecheck, and Tests workflow to run quality checks in parallel and cache Turbo artifacts, cutting wall-clock CI time from ~12-15 min to ~6-7 min cold (~2-3 min warm).

Why

The single quality job serialized boundary checks → lint → typecheck → tests on one runner. GitHub Actions bills by minutes, not jobs, so fanning out into parallel jobs costs the same minutes but collapses wall clock. Without a Turbo cache, every PR also rebuilt packages that never changed.

How

  • 4 parallel jobs (boundaries, lint, typecheck, test) replace the single quality job. Wall clock is now bounded by the slowest job.
  • Turbo cache via actions/cache@v4 on .turbo/ with TURBO_CACHE_DIR env var and restore-keys fallback. Turbo's content hashing then skips unchanged packages.
  • --ignore-scripts on lint/typecheck/boundaries jobs skips better-sqlite3/keytar native rebuilds (~30-60s each). Only the test job needs native bindings, so libsecret-1-dev apt install stays there.
  • Boundary checks (check:contracts, check:architecture, ipc:check) run with & + wait instead of sequentially.
  • paths-ignore skips the entire workflow for docs-only PRs (**/*.md, docs/**, LICENSE).

Type

  • ci — CI/CD changes

Test plan

  • This PR's own CI run validates the new workflow end-to-end
  • Confirm all 4 jobs pass in parallel
  • Confirm Turbo cache hit on a follow-up no-op commit (warm-cache path)
  • Confirm a docs-only commit (e.g. README tweak) correctly skips the workflow

Checklist

  • Self-reviewed the diff
  • No hardcoded secrets or credentials
  • Files stay under ~500 LOC
  • Follows immutable data patterns

Split the single quality job into four parallel jobs (boundaries, lint,
typecheck, test) so wall clock is bounded by the slowest job rather than
the sum. Add turbo cache via .turbo/ with restore-keys fallback so
unchanged packages short-circuit across PRs. Skip native-module rebuild
(--ignore-scripts) and libsecret-1-dev apt install on non-test jobs.
Add paths-ignore for docs-only PRs.
@h4yfans
h4yfans merged commit 8db2003 into main Apr 17, 2026
5 checks passed
@h4yfans
h4yfans deleted the ci/parallelize-quality-jobs branch April 17, 2026 15:42
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