Quick take: TypeScript 7's native
tscruns a GitHub Actions type-check job in around 11 seconds where TypeScript 6 took roughly 95. Cache your dependencies, pin the Node version, and add--checkerson multi-core runners. Fewer runner-minutes, faster PR feedback.
TypeScript 7 CI is the practice of wiring TypeScript 7's native tsc binary into a GitHub Actions type-check job so pull requests get a compile-correctness gate in seconds instead of minutes. TypeScript 7 went GA on July 8, 2026, and the native Go compiler ships as the ordinary tsc binary. There's no separate tsgo command to wire up. That matters for CI because your existing tsc --noEmit step gets 8x to 12x faster the moment you bump the typescript dependency. On a mid-size React app, that turns a GitHub Actions type-check job of about 95 seconds into one that finishes in 11. That's not a rounding error. It's the difference between reviewers waiting and reviewers reviewing. This tutorial wires the native compiler into a real workflow, with caching, --checkers, and a note on matrices. If you still need to migrate the project itself, start with the Project Corsa hub or the step-by-step migration guide; here we're strictly talking CI.
Why bother putting type-checking in CI?
Because your editor lies to you. Local tsc reads whatever's cached, whatever branch you last touched, whatever node_modules you forgot to reinstall. CI runs clean. A dedicated type-check job on every pull request is the only thing that guarantees main actually compiles for the next person who clones it.
The old objection was cost. A full tsc --noEmit on a big codebase could eat 90 seconds or more per run, and on a busy repo that's thousands of runner-minutes a month. On a 40,000-line frontend that checks every push, the type-check job alone can quietly grow into a third of the monthly Actions bill. TypeScript 7 mostly deletes that objection. An 11-second job costs almost nothing and finishes before a reviewer has opened the diff.
What does the type-check workflow look like?
Here's a complete workflow that runs tsc --noEmit on every push and pull request. Nothing exotic, just the native compiler plus dependency caching.
name: Type Check
on:
push:
branches: [main]
pull_request:
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx tsc --noEmit
Two things are doing the work here. The actions/setup-node step with cache: npm restores your dependency cache keyed off the lockfile, so npm ci skips the slow network fetch on a cache hit. And tsc --noEmit type-checks without writing a single .js file, which is all you want a CI gate to do. Prefer pnpm? Swap in pnpm/action-setup, set cache: pnpm, and run pnpm install --frozen-lockfile. The shape is identical.
How much does dependency caching actually save?
More than people expect. A cold npm ci on a project with 900-odd dependencies can run 40 to 60 seconds on a GitHub-hosted runner. With a warm cache it's closer to 8. So the caching step often saves more wall-clock time than the compiler upgrade did. Do both and the job that used to take two minutes finishes in under fifteen seconds.
One caveat I learned the hard way: the cache key has to include your lockfile hash, or you'll serve a stale node_modules after a dependency bump and get baffling type errors that don't reproduce locally. setup-node handles that for you when you point cache at the right lockfile. Don't hand-roll it unless you have to.
Dependency caching is storing the resolved node_modules tree between CI runs, keyed off a hash of the lockfile, so a clean checkout doesn't have to re-download every package from the registry. According to the actions/setup-node documentation, the cache input handles the key computation and restore automatically for npm, yarn, and pnpm lockfiles, which is why hand-rolling actions/cache yourself is rarely worth the maintenance cost.
How do you confirm caching is actually working instead of silently missing every time? Check these four things in the Actions log.
- Open the "Setup Node.js" step and look for a "Cache restored from key" line rather than "Cache not found."
- Compare the
npm cistep duration against a cold run; a warm cache should land near 8 seconds on a 900-dependency project. - Confirm the lockfile committed to the branch matches what CI checked out, a stale local lockfile produces a cache miss every time.
- If misses persist, check that
cache: npmpoints at the correct lockfile path in a monorepo with nestedpackage.jsonfiles.
| Cold install (no cache) | Warm cache | Cache + compiler upgrade | |
|---|---|---|---|
| npm ci time (~900 deps) | 40-60 seconds | ~8 seconds | ~8 seconds |
| Full job time | ~2 minutes | Under 15 seconds | Under 15 seconds |
When should you reach for --checkers?
TypeScript 7 can split type-checking across CPU cores with the --checkers flag. On a default 2-core ubuntu-latest runner it barely moves the needle, since the work doesn't have enough cores to spread across. On a larger runner it's a real win. Microsoft's own VS Code numbers show default type-checking dropping from 77.8 seconds to 7.5 seconds, a 10.4x speedup, and --checkers improves on that further on machines with more cores than the default runner offers (TypeScript Blog, July 2026).
So the rule of thumb is simple. Small repo on a 2-core runner? Leave it alone. Big monorepo on an 8-core box? Match the flag to the cores you've paid for:
# On a larger runner, spread type-checking across cores
npx tsc --noEmit --checkers 8
# Confirm you're on the native compiler (TS 7.0 or newer)
npx tsc --version
Is it worth paying for a bigger runner just to shave three seconds? Usually not on a small app. On a 500,000-line monorepo where the check still takes 30-plus seconds, absolutely, because you're also parallelizing across a dozen contributors hitting CI at once.
Do you still need a build matrix?
Sometimes, but not for this job. A type-check doesn't need to run on three Node versions, because types don't change between Node 20 and Node 22. So for the pure tsc --noEmit gate, skip the matrix and run once. Save the matrix for your test job, where runtime behavior actually differs across versions. Splitting type-checking into its own single job also means a type error fails fast and cheap, without spinning up your whole test grid first.
How does this pair with AI code review?
This is where it gets good. A green type-check tells you the code compiles. It says nothing about whether the code is any good. That's the gap automated review fills, and it's a core pillar here at Coding Dunia: fast deterministic checks for correctness, AI review for judgment. Wire a tool like CodeRabbit alongside the workflow above and every PR gets both a sub-15-second tsc gate and a contextual review pass. I walk through that exact setup in AI code review for TypeScript. The compiler catches the type errors; the AI catches the logic the types can't express.
The honest takeaway? TypeScript 7 doesn't just make CI faster, it makes a fast type-check job cheap enough that there's no excuse to skip it. Turn it on this week.
Related
- tsgo speed benchmarks for TypeScript 7 - the full methodology behind the 95-to-11-second numbers, measured repo by repo
- TypeScript 7 monorepo migration - wiring the same CI job across multiple packages and tsconfig files
- TypeScript 7 Migration Readiness Checker - score your tsconfig.json before you wire it into this workflow
Check Your Own tsconfig.json
Paste it below for an instant readiness score against everything TypeScript 7 removed or changed. Runs in your browser, nothing is uploaded.
Need to check package.json too, or want the full breakdown? Use the full TypeScript 7 Migration Readiness Checker.