Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/frontend-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Frontend

on:
push:
branches:
- main
pull_request:

jobs:
node-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 24
# Pin npm >= 11.16 so the v12 install defaults in .npmrc are enforced
# regardless of the npm bundled with Node. (--engine-strict=false so this
# bootstrap step itself isn't gated by package.json "engines".)
- name: Upgrade npm to enforce npm v12 install defaults
run: npm install -g npm@11.16.0 --engine-strict=false
- name: Install dependencies
run: npm ci
- name: Run vitest
# `vitest run` does a single pass and exits (the npm "test" script runs
# in watch mode, which would hang CI).
run: npx vitest run
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ help:
@echo " make pytest-postgres pytest against a disposable postgres:16 container"
@echo " make ruff ruff check + ruff format --check"
@echo " make ty ty check"
@echo " make test ruff + ty + pytest"
@echo " make test-backend ruff + ty + pytest"
@echo " make test-frontend vitest (frontend unit tests, single run)"
@echo " make test test-backend + test-frontend (everything)"
@echo ""
@echo "Other:"
@echo " make dev Sync deps into .venv via uv (idempotent)"
Expand Down Expand Up @@ -198,5 +200,12 @@ ruff: dev
uv run ruff check .
uv run ruff format --check .

.PHONY: test-backend
test-backend: ruff ty pytest

.PHONY: test-frontend
test-frontend:
npm install && npx vitest run

.PHONY: test
test: ruff ty pytest
test: test-backend test-frontend
Loading