mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 00:12:39 +00:00
ci: lint and typecheck the whole tree in CI and only staged files in the pre-commit hook
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user