Skip to content

perf(ci): infra jest transpile-only + shared tsc type-check - #1113

Merged
DerrickF merged 1 commit into
developfrom
perf/infra-jest-transpile
Sep 15, 2026
Merged

DerrickF merged 1 commit into
developfrom
perf/infra-jest-transpile

Conversation

@DerrickF

Copy link
Copy Markdown
Contributor

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-jest isolatedModules: true (transpile-only).
  • .github/workflows/tests.yml: add a single tsc --noEmit (npm run build) step before jest so type safety is preserved — previously only ts-jest type-checked infra on a PR (tsc ran 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

  • No const enum in the tree (isolatedModules-safe).
  • tsc --noEmit now runs on every PR (net more type coverage than before, and earlier than teardown).
  • Verified locally: tsc clean; 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.

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.
@DerrickF
DerrickF merged commit d26f7ea into develop Sep 15, 2026
6 checks passed
@philmerrell philmerrell mentioned this pull request Sep 15, 2026
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