Skip to content

Commit e3a7df7

Browse files
authored
ci: only typecheck in typechecking job (#7072)
This allows CI to actually report all the other checks when you have type errors
1 parent 31e5e59 commit e3a7df7

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

.github/workflows/e2e-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install dependencies
4343
run: npm ci --no-audit
4444
- name: Build package
45-
run: npm run build
45+
run: npm run build:ci
4646
- run: npm run e2e
4747
- name: Notify Slack
4848
uses: 8398a7/action-slack@v3
@@ -92,7 +92,7 @@ jobs:
9292
- name: Install dependencies
9393
run: npm ci --no-audit
9494
- name: Build package
95-
run: npm run build
95+
run: npm run build:ci
9696
- run: npm run e2e
9797
- name: Notify Slack
9898
uses: 8398a7/action-slack@v3

.github/workflows/integration-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install core dependencies
5656
run: npm ci --no-audit
5757
- name: Build package
58-
run: npm run build
58+
run: npm run build:ci
5959
- name: Generate self-signed certificates
6060
run: npm run certs
6161
shell: bash
@@ -142,7 +142,7 @@ jobs:
142142
- name: Install core dependencies
143143
run: npm ci --no-audit
144144
- name: Build package
145-
run: npm run build
145+
run: npm run build:ci
146146
- name: Generate self-signed certificates
147147
run: npm run certs
148148
shell: bash

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ jobs:
2323
run: npm ci --no-audit
2424
# Almost not needed, but a single file in `scripts/` imports built code
2525
- name: Build package
26-
run: npm run build
26+
run: npm run build:ci
2727
- name: Run lint
2828
run: npm run lint

.github/workflows/typecheck.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Typecheck
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
typecheck:
11+
name: Typecheck
12+
if: "${{ !startsWith(github.head_ref, 'release-') }}"
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Git checkout
16+
uses: actions/checkout@v4
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
cache: npm
22+
- name: Install core dependencies
23+
run: npm ci --no-audit
24+
- name: Run typecheck
25+
run: npm run typecheck

.github/workflows/unit-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install core dependencies
3232
run: npm ci --no-audit
3333
- name: Build package
34-
run: npm run build
34+
run: npm run build:ci
3535
- name: Run unit tests
3636
uses: nick-fields/retry@v3
3737
with:

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"scripts": {
3434
"build": "tsc",
35+
"build:ci": "tsc --noCheck",
3536
"certs": "openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 -subj \"/CN=localhost\" -extensions EXT -config certconf",
3637
"dev": "tsc --watch",
3738
"e2e": "node ./tools/e2e/run.js",
@@ -56,6 +57,7 @@
5657
"test:init:hugo-deps": "npm ci --prefix tests/integration/__fixtures__/hugo-site --no-audit",
5758
"test:init:monorepo-deps": "cd tests/integration/__fixtures__/monorepo && pnpm install --frozen-lockfile",
5859
"test:init:next-deps": "npm ci --prefix tests/integration/__fixtures__/next-app-without-config --no-audit && npm ci --prefix tests/integration/__fixtures__/next-app --no-audit",
60+
"typecheck": "tsc --noEmit",
5961
"watch": "c8 --reporter=lcov vitest --watch"
6062
},
6163
"config": {

0 commit comments

Comments
 (0)