-
Notifications
You must be signed in to change notification settings - Fork 6
ci: run the frontend vitest suite on pull requests #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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 | ||||||||||
|
Comment on lines
+40
to
+41
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushtrigger onmainhas nopathsfilter, so this job runs on every push to main regardless of which files were changed (e.g., a backend-only or docs-only commit). The siblinggo.ymlworkflow sets apathsfilter for itspushtrigger to avoid this. Adding the same filter here would keep CI consistent and avoid burning runner minutes on unrelated pushes.