perf(ci): infra jest transpile-only + shared tsc type-check - #1113
Merged
Merged
Conversation
Make ts-jest transpile-only (isolatedModules) so jest workers stop re-type-checking the whole project each — the dominant cost of the infra suite (the long pole once backend went parallel in #1111). Add a single 'tsc --noEmit' (npm run build) step to the infra CI job so type safety is preserved on PRs (previously only ts-jest enforced it; tsc ran only in teardown.yml). Workers stay at 2 (the --maxWorkers bump regressed 2.5x in #1112). No const enum in the tree, so isolatedModules is safe. Verified: tsc clean; 178 tests green transpile-only.
Merged
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
Cuts the infra jest job (the PR long pole, ~6m32s, after backend went parallel in #1111) by removing redundant per-worker type-checking:
infrastructure/jest.config.js: ts-jestisolatedModules: true(transpile-only)..github/workflows/tests.yml: add a singletsc --noEmit(npm run build) step before jest so type safety is preserved — previously only ts-jest type-checked infra on a PR (tscran only in teardown.yml).Why this lever (not workers)
#1112 tried
--maxWorkers=100%and regressed 2.5× (392s -> 977s): ts-jest re-type-checks per worker with no shared cache, so more workers thrash. The cost is the type-checking, not the parallelism — so we type-check once and let workers just transpile. Workers stay at 2.Safety
const enumin the tree (isolatedModules-safe).tsc --noEmitnow runs on every PR (net more type coverage than before, and earlier than teardown).tscclean; 178 tests green transpile-only.Measurement
Baseline infra job: ~392s. This PR's own
Test infrastructure (jest)+ new type-check step is the proof — compare the sum to 392s.