Skip to content

TypeScript 7 CI: Wiring Native tsc into GitHub Actions

Wire TypeScript 7's native tsc into GitHub Actions CI. A type-check job with npm caching and --checkers drops from 95 seconds to 11.

· · 7 min read

Updated: August 8, 2026

Screen full of dense terminal output

Quick Take

TypeScript 7's native tsc ships as the standard binary, so a GitHub Actions type-check job that took about 95 seconds on TypeScript 6 now finishes in roughly 11. Cache dependencies, add --checkers on multi-core runners, and CI feedback tightens without touching your type-checking logic.

Quick take: TypeScript 7's native tsc runs 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 --checkers on 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.

Bundled yellow industrial pipes running along the top of a building against a blue sky
Photo by Pierre Chatel-Innocenti on Unsplash

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.

  1. Open the "Setup Node.js" step and look for a "Cache restored from key" line rather than "Cache not found."
  2. Compare the npm ci step duration against a cold run; a warm cache should land near 8 seconds on a 900-dependency project.
  3. Confirm the lockfile committed to the branch matches what CI checked out, a stale local lockfile produces a cache miss every time.
  4. If misses persist, check that cache: npm points at the correct lockfile path in a monorepo with nested package.json files.
Cold install (no cache)Warm cacheCache + compiler upgrade
npm ci time (~900 deps)40-60 seconds~8 seconds~8 seconds
Full job time~2 minutesUnder 15 secondsUnder 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.

Three parallel pink industrial pipes with valves against a pale sky
Photo by Jens Freudenau on Unsplash

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.

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.

Frequently Asked Questions

Do I need to install tsgo to run TypeScript 7 in CI?
No. TypeScript 7.0 reached GA on July 8, 2026, and the native Go compiler ships as the standard tsc binary. Your CI step stays npx tsc --noEmit. The tsgo name only referred to the pre-release native-preview package and does not exist as a separate command at GA.
How much faster is a TypeScript 7 type-check job in GitHub Actions?
Microsoft reports 8x to 12x faster full builds. In practice a mid-size type-check job that ran around 95 seconds on TypeScript 6 finishes in roughly 11 seconds on TypeScript 7. Faster jobs mean fewer runner-minutes billed and tighter pull request feedback.
What does the --checkers flag do in CI?
The --checkers flag splits type-checking across CPU cores. On a default 2-core ubuntu-latest runner it barely helps. On a larger runner it does: Microsoft's VS Code benchmark (77.8 seconds down to 7.5 seconds, a 10.4x speedup at default settings) improves further with more checkers on a bigger machine, though Microsoft hasn't published an exact figure for --checkers 8 specifically. Match the flag value to the runner's core count and benchmark your own CI job rather than assuming a fixed multiplier.
Should the type-check job use a Node version matrix?
Usually not. Types do not change between Node 20 and Node 22, so running tsc --noEmit once is enough. Keep the matrix for your test job, where runtime behavior actually differs across versions. A single type-check job also fails fast and cheap on a type error.