Skip to content

Commit 09f1fb5

Browse files
authored
Merge pull request #254 from jeffshee/feat/workflow-add-check
feat(ci): add typecheck and lint job
2 parents 1a9795f + 2b4353e commit 09f1fb5

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,40 @@ env:
1616
UUID: hanabi-extension@jeffshee.github.io
1717

1818
jobs:
19+
# Static analysis only; no system deps needed, so it runs alongside build.
20+
check:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: 20
30+
cache: npm
31+
# The lint toolchain has its own manifest under tools/.
32+
cache-dependency-path: |
33+
package-lock.json
34+
tools/package-lock.json
35+
36+
- name: Install npm dependencies
37+
run: npm ci
38+
39+
# eslint-config-gnome and ci-run-eslint live in tools/, not the root
40+
# manifest. Installing here keeps `npm run lint` from doing it implicitly.
41+
- name: Install lint toolchain
42+
run: npm ci
43+
working-directory: tools
44+
45+
- name: Typecheck
46+
run: npm run typecheck
47+
48+
# Runs even if typecheck failed, so one run reports both.
49+
- name: Lint
50+
if: '!cancelled()'
51+
run: npm run lint
52+
1953
build:
2054
runs-on: ubuntu-latest
2155
steps:

0 commit comments

Comments
 (0)