ci(frontend): run npm run check to gate generated-type drift on PRs
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 1m15s
CI / OCR Service Tests (pull_request) Successful in 22s
CI / Backend Unit Tests (pull_request) Failing after 3m35s
CI / fail2ban Regex (pull_request) Successful in 46s
CI / Semgrep Security Scan (pull_request) Successful in 20s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m1s

`npm run lint` does not type-check, so a hand-edited or stale api.ts whose
required fields are missing from Document/Person mocks would pass CI. Adds a
svelte-check/tsc step after Lint (svelte-kit sync + paraglide compile already
ran), making the frontend type-check a blocking gate on every pull_request.

Note for the repo owner: enforcing this as a required status check is a Gitea
branch-protection setting, not code — please mark the CI job required on the
protected branches.

Refs #671

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-27 09:34:36 +02:00
parent ae674b14d4
commit b959e312b1

View File

@@ -45,6 +45,13 @@ jobs:
run: npm run lint run: npm run lint
working-directory: frontend working-directory: frontend
# svelte-check / tsc — catches generated-type drift (e.g. a hand-edited
# api.ts whose required fields are missing from Document/Person mocks).
# `npm run lint` alone does not type-check. See PR #673 / #671.
- name: Type check
run: npm run check
working-directory: frontend
- name: Assert no banned vi.mock patterns - name: Assert no banned vi.mock patterns
shell: bash shell: bash
run: | run: |