ci: lint and typecheck the whole tree in CI and only staged files in the pre-commit hook

This commit is contained in:
Linus Rath
2026-10-19 19:09:46 +02:00
parent 6a59faf127
commit 9ef7e686ce
3 changed files with 33 additions and 1 deletions
+25
View File
@@ -34,3 +34,28 @@ jobs:
# from timing out on the shared runners; the longer per-test timeout
# covers the jsdom-heavy suites.
run: npx vitest run --pool=forks --maxWorkers=2 --testTimeout=15000
# The pre-commit hook lints only staged files and never runs on fork PRs,
# so this is the one place the whole tree is checked.
lint:
name: Lint and typecheck
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Lint
run: npm run lint