Skip to content

Commit 08d571a

Browse files
committed
ci: add precheck and typecheck
1 parent 9524a30 commit 08d571a

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,47 @@ on:
88
- master
99

1010
jobs:
11+
precheck:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
with:
20+
run_install: false
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: pnpm
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Audit dependencies
32+
run: pnpm audit --audit-level=high
33+
34+
- name: Lint
35+
run: pnpm lint
36+
37+
- name: Typecheck
38+
run: pnpm typecheck
39+
40+
- name: Test
41+
run: pnpm test
42+
43+
- name: Build
44+
run: pnpm build
45+
46+
- name: Size limit
47+
run: pnpm size
48+
1149
build:
50+
needs: precheck
51+
if: needs.precheck.result == 'success'
1252
runs-on: ${{ matrix.os }}
1353
strategy:
1454
fail-fast: false

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@
8989
"lint-staged": {
9090
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
9191
"biome check --write --no-errors-on-unmatched"
92+
],
93+
"*.ts": [
94+
"pnpm typecheck"
9295
]
9396
}
9497
}

0 commit comments

Comments
 (0)