ci(frontend): run the frontend test suite in CI - #24
Merged
Merged
Conversation
CI — Frontend only type-checked and built, so the 276 vitest tests never ran on PRs and a frontend regression could merge green. Adds a test job mirroring the API workflow's (same pinned actions, Bun 1.4.2, bun cache, frozen install), and gates the frontend Docker build on it like the API workflow does. Named "Test (frontend)" rather than "Test": required status checks match on job name, and "Test" is already the API workflow's required check.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain.
Pull request overview
Adds frontend test execution to CI and gates the frontend Docker build on successful tests.
Changes:
- Adds a
Test (frontend)job using Bun and Vitest. - Updates Docker build dependencies to include frontend tests.
File summaries
| File | Summary |
|---|---|
.github/workflows/ci-frontend.yml |
Adds frontend testing and test-gated Docker builds. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Test (frontend)job inCI — Frontend:bun run testinfrontend/(vitest, 276 tests). Mirrors the API workflow'sTestjob exactly — pinnedactions/checkout@v7.0.0,oven-sh/setup-bunwith Bun1.4.2, the sameactions/cachekey,bun install --frozen.Docker buildjob now alsoneeds: test, matching how the API workflow gates its image on its tests.Why
The frontend workflow only type-checked and built — its test suite never ran in CI, so a frontend regression could merge with every check green.
Why the distinct name
Required status checks are matched by job name.
Testis already the API workflow's required check, so a second job with that name couldn't be told apart in branch protection. Note the same ambiguity already exists forType-checkandDocker build, which both workflows define.Follow-up (needs a repo-settings change — not done here)
To make this blocking, add
Test (frontend)to the required checks onmainonce this merges:gh api -X POST repos/GravityDarkLab/Ons/branches/main/protection/required_status_checks/contexts -f 'contexts[]=Test (frontend)'Testing
bun install --frozen→bun run testinfrontend/— 28 files, 276 tests passed.🤖 Generated with Claude Code