Skip to content

Commit 681b86c

Browse files
authored
Add GitHub Actions (#37)
1 parent a02b0f6 commit 681b86c

File tree

6 files changed

+67
-14
lines changed

6 files changed

+67
-14
lines changed

.github/workflows/build.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Setup pnpm
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: 6.32.9
18+
19+
- name: Setup Node.js with pnpm cache
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
cache: "pnpm"
24+
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: Type check project
29+
run: |
30+
pnpm run type-build
31+
pnpm run type-check
32+
33+
- name: Lint and check formatting
34+
run: pnpm run check
35+
36+
- name: Build project
37+
run: pnpm run build

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254
"lint": "biome lint",
255255
"format": "biome format",
256256
"check": "biome check",
257+
"type-build": "tsc --build",
258+
"type-check": "tsc --noEmit",
257259
"build-js": "node ./esbuild.mjs",
258260
"prod-js": "cross-env NODE_ENV=production node ./esbuild.mjs",
259261
"watch-js": "node ./esbuild.mjs --watch",
@@ -275,7 +277,8 @@
275277
"cross-env": "^7.0.3",
276278
"esbuild": "^0.25.3",
277279
"npm-run-all": "^4.1.5",
278-
"tailwindcss": "^4.1.5"
280+
"tailwindcss": "^4.1.5",
281+
"typescript": "^5.8.3"
279282
},
280283
"dependencies": {
281284
"@preact/signals": "^2.0.4",

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.app.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
},
1212
"extends": "./tsconfig.json",
1313
"include": [
14-
"./src/views/judge/webview/**/*.tsx",
15-
"./src/views/judge/webview/**/*.ts",
16-
"./src/views/judge/message.ts",
17-
"./src/views/stress/webview/**/*.tsx",
18-
"./src/views/stress/webview/**/*.ts",
19-
"./src/views/stress/message.ts",
20-
"./src/common/**/*.ts",
21-
"./src/common/**/*.tsx",
22-
"./src/utils/**/*.ts",
23-
"./external/observable.ts", "src/common/webview.tsx"
14+
"src/views/judge/webview/**/*.tsx",
15+
"src/views/judge/webview/**/*.ts",
16+
"src/views/judge/message.ts",
17+
"src/views/stress/webview/**/*.tsx",
18+
"src/views/stress/webview/**/*.ts",
19+
"src/views/stress/message.ts",
20+
"src/common/**/*.ts",
21+
"src/common/**/*.tsx",
22+
"src/utils/common.ts",
23+
"src/utils/webview.tsx",
24+
"external/observable.ts"
2425
]
2526
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"~utils/*": ["./src/utils/*"],
66
"~external/*": ["./external/*"]
77
},
8-
"strict": true
8+
"strict": true,
9+
"outDir": "./dist/types"
910
},
1011
"references": [
1112
{

tsconfig.node.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"src/views/judge/provider/**/*.ts",
1414
"src/views/stress/message.ts",
1515
"src/views/stress/provider/**/*.ts",
16-
"./src/common/**/*.ts",
17-
"./src/utils/**/*.ts"
16+
"src/common/**/*.ts",
17+
"src/utils/common.ts",
18+
"src/utils/vscode.ts"
1819
]
1920
}

0 commit comments

Comments
 (0)