ci: parallelize quality jobs and add turbo cache - #264
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Refactor the CI
Lint, Typecheck, and Testsworkflow 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
qualityjob 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
boundaries,lint,typecheck,test) replace the singlequalityjob. Wall clock is now bounded by the slowest job.actions/cache@v4on.turbo/withTURBO_CACHE_DIRenv var andrestore-keysfallback. Turbo's content hashing then skips unchanged packages.--ignore-scriptson lint/typecheck/boundaries jobs skipsbetter-sqlite3/keytarnative rebuilds (~30-60s each). Only the test job needs native bindings, solibsecret-1-devapt install stays there.check:contracts,check:architecture,ipc:check) run with&+waitinstead of sequentially.paths-ignoreskips the entire workflow for docs-only PRs (**/*.md,docs/**,LICENSE).Type
ci— CI/CD changesTest plan
Checklist