diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 47b59edab..c2cbc4d2e 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -25,6 +25,10 @@ jobs: - run: yarn --immutable --immutable-cache - run: yarn build - run: yarn lint:check + # Typecheck including test files. `yarn build` uses tsconfig.prod.json, + # which excludes **/*.test.ts, and `yarn test` runs via a type-stripping + # loader — so without this, type errors in test code reach no CI gate. + - run: yarn typecheck - run: yarn test:ci - name: Build core Docker image if: matrix.os == 'ubuntu-latest' diff --git a/package.json b/package.json index f6c51cafb..ce25101a8 100644 --- a/package.json +++ b/package.json @@ -188,6 +188,7 @@ "test:auto-verify:indexing": "node --no-deprecation --import ./register.js src/tests/auto-verify/run.ts", "lint:check": "eslint src test", "lint:fix": "eslint --fix src test", + "typecheck": "tsc --noEmit -p tsconfig.json", "duplicate:check": "jscpd src", "duplicate:report": "jscpd src --reporters html,console", "duplicate:ci": "jscpd src --reporters console --exitCode 1",