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, at least on codebases big enough for checking to dominate. Smaller repos see less: the tsgo benchmarks linked at the end of this guide measured 4.4x to 5.8x on three workspaces of the monorepo behind it. Even that is enough to change how long a reviewer waits for a green check. 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.
Correction, November 23, 2026. An earlier version of this tutorial said a type-check job drops from 95 seconds to 11. That number didn't come from a run that can be shown, so it's gone. The figures in this tutorial are Microsoft's published VS Code result and the measured runs in the tsgo benchmarks article, which lays them out step by step.
Why type-checking belongs in CI
Local tsc reads whatever's cached, whatever branch you last touched, whatever node_modules you forgot to reinstall. CI runs from a clean checkout, which is why a type-check job on every pull request is worth having.
Your editor lies to you. 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. TypeScript 7 mostly removes that objection. A job that finishes in seconds costs almost nothing and finishes before a reviewer has opened the diff.
The type-check workflow
This is a complete workflow that runs tsc --noEmit on every push and pull request, using 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 steps do the work. The actions/setup-node step with cache: npm restores npm's download 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 rest of the job is the same.
What dependency caching saves
Often more than the compiler upgrade does. Once tsc itself finishes in seconds, the install step is usually the slowest thing left in the job, and that's the part a cache shortens. Time a cold run and a warm run of npm ci in your own Actions log before deciding it isn't worth it.
One caveat applies if you cache node_modules yourself with actions/cache: the key has to include your lockfile hash, or you'll restore a stale tree after a dependency bump and get baffling type errors that don't reproduce locally. setup-node avoids that, because it keys its cache on the lockfile and lets npm ci build node_modules fresh every run. Don't hand-roll it unless you have to.
Dependency caching, as setup-node does it, is storing the package manager's download cache 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. Its README is explicit that the action does not cache node_modules itself. 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.
To confirm caching is working instead of silently missing every time, check 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 be clearly shorter. - 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.
When to use --checkers
TypeScript 7 can split type-checking across CPU cores with the --checkers flag. A standard ubuntu-latest runner has 2 cores in a private repository and 4 in a public one, per GitHub's runner reference, so raising the flag there barely moves the needle. On a larger runner it's a real win. Microsoft's own VS Code numbers show type-checking dropping from 125.7 seconds on TypeScript 6 to 10.6 seconds on TypeScript 7 at the default --checkers 4, an 11.9x speedup, and to 7.51 seconds with --checkers 8 on the same machine (TypeScript Blog, July 2026). The blog also warns that on machines with fewer cores and less memory, such as CI runners, you may want to turn the value down rather than up.
My rule of thumb: leave a small repo on a standard runner alone, and on a big monorepo with 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
Paying for a bigger runner just to shave three seconds usually isn't worth it on a small app. On a 500,000-line monorepo where the check still takes 30-plus seconds it is, 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.
One runner-side detail changed after this guide first went up. GitHub scheduled the ubuntu-latest label to move to Ubuntu 26.04 in a gradual rollout between October 19 and November 19, 2026. The workflow above pins Node with actions/setup-node, so the type-check keeps running on the version you chose. A job that skips that step would pick up the new image's default Node instead. What else differs, and how to test it on a spare matrix leg, is in the Ubuntu 26.04 CI guide.
Pairing the type-check with AI code review
A green type-check tells you the code compiles and says nothing about whether the code is any good. Automated review fills that gap, and it's how I think about the split on 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 fast tsc gate and a contextual review pass. I walk through that setup in CI/CD quality gates for AI-generated code. The compiler catches the type errors; the AI catches the logic the types can't express.
TypeScript 7 makes a type-check job cheap enough that I don't see a reason to skip it any more. Turn it on this week.
Related Guides
- tsgo speed benchmarks for TypeScript 7 - the full methodology and raw runs, 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
- The typescript-eslint ERESOLVE fix - if the same workflow runs ESLint, its TypeScript peer range is what blocks the TS 7 install
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.