Skip to content

Commit 5e9db0e

Browse files
authored
Merge pull request #4272 from github/mbg/ci/typecheck
Add `typecheck` commands
2 parents 255c50d + a189728 commit 5e9db0e

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

‎.github/workflows/pr-checks.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,15 @@ jobs:
126126
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
127127
run: .github/workflows/script/verify-pr-checks.sh
128128

129+
- name: Typecheck pr-checks scripts
130+
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
131+
working-directory: pr-checks
132+
run: npm run typecheck
133+
129134
- name: Run pr-checks tests
130135
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}
131136
working-directory: pr-checks
132-
run: npx tsx --test
137+
run: npm run test
133138

134139
- name: Run `pr-checks/changenotes.ts` to ensure that all unreleased change notes are valid
135140
if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }}

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"test": "npm run ava -- src/",
1414
"test-debug": "npm run test -- --timeout=20m",
1515
"transpile": "tsc --build --verbose tsconfig.json",
16-
"update-pr-checks": "./pr-checks/sync.sh"
16+
"update-pr-checks": "./pr-checks/sync.sh",
17+
"typecheck": "tsc --noEmit"
1718
},
1819
"license": "MIT",
1920
"workspaces": [

‎pr-checks/package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"private": true,
33
"description": "Dependencies for codeql-action scripts",
44
"type": "module",
5+
"scripts": {
6+
"typecheck": "tsc --noEmit",
7+
"test": "npx tsx --test",
8+
"checks": "npm run typecheck && npm run test"
9+
},
510
"dependencies": {
611
"@actions/core": "^2.0.3",
712
"@actions/github": "^8.0.1",

‎pr-checks/tsconfig.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@
99
"noEmit": true
1010
},
1111
"include": ["./**/*.ts", "../src/**/*.ts"],
12-
"exclude": ["node_modules"]
12+
"exclude": [
13+
"node_modules",
14+
"../src/testdata/**",
15+
"../src/**/*.test.ts",
16+
"../src/testing-utils.ts",
17+
"../src/json/testing-util.ts",
18+
"../src/feature-flags/testing-util.ts"
19+
]
1320
}

0 commit comments

Comments
 (0)