Skip to content

Add make target and CI job for frontend unit testing#564

Draft
barborico wants to merge 3 commits into
brynna/plugin_group_config_in_requestsfrom
brynna/frontend_test_ci
Draft

Add make target and CI job for frontend unit testing#564
barborico wants to merge 3 commits into
brynna/plugin_group_config_in_requestsfrom
brynna/frontend_test_ci

Conversation

@barborico

@barborico barborico commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add make test-frontend and a "Test Frontend" GitHub Actions workflow so frontend unit tests (vitest) run in CI, and restructure the Makefile test targets so make test runs both backend and frontend.

Urgency: 3 days
Expected review effort: LOW

DX

image

Motivation

This branch stack adds frontend components (e.g. AppGroupLifecyclePluginConfigurationForm) with vitest tests, but nothing in CI runs them — only the Python suite (ci.yml) and prettier/lint (lint.yml) gate PRs today. Component tests could regress unnoticed. Stacked on brynna/plugin_group_config_in_requests because the components under test live on that branch, not main.

Description of Changes

  • .github/workflows/frontend-test.yml: new "Test Frontend" workflow with a node-test job mirroring the existing node-lint job in lint.yml (setup-node v7, node 24, pinned npm >= 11.16, npm ci), running npx vitest run.

  • Makefile: restructured the test targets into an umbrella so make test runs everything:

    • test-backendruff ty pytest (pure uv/Python, no Node toolchain)
    • test-frontendnpm install && npx vitest run
    • testtest-backend test-frontend

    This makes make test the single "run everything before pushing" gate (previously it was backend-only, so frontend tests were invisible to make test), while keeping a Node-free test-backend for backend-only contributors.

  • Both frontend entry points use vitest run (single pass) rather than the watch-mode npm test script, so CI exits with a real status code.

Validation of Changes

  • make test-frontend → 2 files, 14 tests passing, clean exit.
  • npx vitest run exits 0.
  • make -n test confirmed to chain: uv sync → ruff → ty → pytest → npm install → vitest run.
  • Workflow uses only static run: commands — no untrusted github.event.* interpolation.

Guidance for Reviewers

  • Behavior change to flag: make test now requires a Node toolchain (it invokes npm install). Backend-only contributors who want the old behavior should use make test-backend.
  • Confirm the new workflow belongs in its own file vs. folding a node-test job into ci.yml (named "Test Python"). I chose a separate "Test Frontend" file to parallel the existing Python/Node CI split.
  • This PR targets brynna/plugin_group_config_in_requests (stacked). Merge/rebase the base first; retarget to main once the base lands.

Add a "Test Frontend" GitHub Actions workflow and wire vitest into the
Makefile so frontend unit tests (e.g. AppGroupLifecyclePluginConfigurationForm)
run in CI and locally. Previously only the Python suite and prettier/lint
checks gated PRs; component tests could regress unnoticed.

Restructure the test targets so `make test` is an umbrella that runs
everything:
  - `test-backend`  -> ruff + ty + pytest (pure uv/Python, no Node)
  - `test-frontend` -> npm install && npx vitest run
  - `test`          -> test-backend + test-frontend
This makes `make test` the single "run everything before pushing" gate
(fixing the discoverability gap where frontend tests were invisible)
while keeping a Node-free `test-backend` for backend-only contributors.

Both frontend entry points invoke `npx vitest run` (single pass, not the
watch-mode `npm test` script) so CI exits with a real status. The
workflow mirrors the existing node-lint job in lint.yml (setup-node v7,
npm >= 11.16, `npm ci`) to keep the Node CI setup consistent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@barborico
barborico force-pushed the brynna/frontend_test_ci branch from fea9b03 to d278d12 Compare July 24, 2026 23:16
@barborico barborico changed the title ci(frontend): add make target and CI job for vitest Add make target and CI job for frontend unit testing Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant