Skip to content

Commit f314505

Browse files
authored
ci: add typecheck (#11)
1 parent 788d89a commit f314505

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
typecheck:
17+
name: Typecheck
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: .nvmrc
29+
cache: "pnpm"
30+
- name: Install dependencies
31+
run: pnpm install
32+
- name: Run typecheck
33+
run: pnpm run typecheck

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"fast-start": "node dist/main.js configs/config.yaml",
1313
"build": "npm run clean && npm run fast-build",
1414
"fast-build": "swc src -d dist --strip-leading-paths",
15-
"clean": "rm -rf dist"
15+
"clean": "rm -rf dist",
16+
"typecheck": "tsc --noEmit"
1617
},
1718
"repository": {
1819
"type": "git",

0 commit comments

Comments
 (0)