Skip to content
Latchkey

GitHub Actions Workflow for Lint and Type-Check in Parallel

Run lint and type-check side by side, not back to back.

This workflow splits lint and type-check into independent jobs that run concurrently, shortening the critical path.

The workflow

.github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: npm }
      - run: npm ci
      - run: npm run lint
  typecheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20, cache: npm }
      - run: npm ci
      - run: npm run type-check

Notes

  • Independent jobs run in parallel by default.
  • Each installs deps, so caching keeps the overhead small.
  • Add a test job alongside for a three-way fan-out.

Run it cheaper

Point runs-on: at a Latchkey label to run this workflow at roughly 69% lower per-minute cost, with self-healing for transient failures.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →