ci: run the frontend vitest suite on pull requests (#172)

* ci: run the frontend vitest suite on pull requests

The renderer suite was dead for months with nothing noticing — no workflow
executed it (and until #171 it could not even run: vitest auto-loads only
vite.config.ts / vitest.config.ts, which the repo lacked). This job keeps
the revived suite alive.

Typecheck is intentionally left out until the pre-existing forge.config /
update-electron-app type errors are fixed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(frontend): regenerate package-lock.json in sync with package.json

The committed lock was missing dozens of entries (ansi-regex, error-ex,
minimatch, ...), so `npm ci` under CI's npm 10 hard-fails with "Missing:
<pkg> from lock file" — the new Frontend workflow caught it on its first
run. Newer local npm versions tolerated the drift, which is why it went
unnoticed. Regenerated with npm install (npm 10.9.8, lockfileVersion 3) and
validated with a clean `npm ci` + full vitest run (9/9 files, 99/99 tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Ashish Huddar 2026-06-11 12:18:55 +05:30 committed by GitHub
parent d60c49f5fb
commit 785f060b71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13173 additions and 7969 deletions

41
.github/workflows/frontend.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Frontend
# Runs the renderer vitest suite. This suite was silently dead for months
# because no workflow executed it (vitest only auto-loads vite.config.ts /
# vitest.config.ts, and the repo had neither until #171) — this job is the
# guard against that happening again.
#
# Typecheck is intentionally NOT run here yet: forge.config.ts and
# update-electron-app carry pre-existing type errors. Add `npm run typecheck`
# once those are fixed.
on:
push:
branches: [main]
pull_request:
paths:
- "frontend/**"
- ".github/workflows/frontend.yml"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- name: Run vitest suite
run: npx vitest run

21101
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff