The TypeScript repository uses GitHub Actions to implement a comprehensive continuous integration (CI) system that validates all changes to the codebase. The CI pipeline runs on pull requests, main branch commits, and merge queue events, executing a matrix of tests across multiple operating systems and Node.js versions, along with code quality checks, security scanning, and automated maintenance tasks.
For information about the build system that CI uses to compile and test TypeScript, see Build System. For release management processes that use some of these workflows, see Release Management.
The CI system consists of several GitHub Actions workflows that work together to ensure code quality. The main entry point for validation is ci.yml, while specialized workflows handle security and repository maintenance.
Sources: .github/workflows/ci.yml1-439 .github/workflows/codeql.yml1-74 .github/workflows/scorecard.yml1-61
The primary validation engine for TypeScript is the ci.yml workflow. It orchestrates a massive test matrix across Linux, Windows, and macOS, ensuring compatibility with Node.js versions ranging from v14 to the current latest (v24). This pipeline is responsible for running the standard test suite, checking code coverage via c8, and enforcing linting and formatting rules.
Key components of this pipeline include:
npm run test across diverse environments .github/workflows/ci.yml27-131hereby lint, hereby knip, and dprint check .github/workflows/ci.yml166-210For details, see Main CI Pipeline.
Sources: .github/workflows/ci.yml1-439 package.json88-101
Beyond standard PR validation, the repository utilizes specialized workflows to automate routine maintenance and handle complex testing scenarios. These workflows ensure the repository stays healthy without manual intervention for repetitive tasks.
The maintenance suite includes:
update-package-lock.yaml runs daily to refresh dependencies and update the Last Known Good (LKG) compiler .github/workflows/update-package-lock.yaml1-86twoslash-repros.yaml automates the verification of code samples provided in GitHub issues using the Twoslash engine .github/workflows/twoslash-repros.yaml1-90new-release-branch.yaml and sync-branch.yaml automate the creation and synchronization of release branches, including version bumping in package.json and src/compiler/corePublic.ts .github/workflows/new-release-branch.yaml76-79accept-baselines-fix-lints.yaml allows developers to manually trigger a bulk update of reference baselines and lint fixes .github/workflows/accept-baselines-fix-lints.yaml1-41For details, see Automated Maintenance.
Sources: .github/workflows/update-package-lock.yaml1-86 .github/workflows/twoslash-repros.yaml1-90 .github/workflows/new-release-branch.yaml1-129 src/compiler/corePublic.ts1-20
The following diagram maps CI workflows to the specific scripts and tools they execute within the codebase.
Sources: .github/workflows/ci.yml123 .github/workflows/ci.yml210 .github/workflows/update-package-lock.yaml52 Herebyfile.mjs1-100 package.json88-101