Replace CI lint jobs with backend, frontend, and e2e test jobs
Lint, formatting, and type checks are already enforced by prek pre-commit hooks, so CI now focuses on running the actual test suites instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# nuzlocke-tracker-4a6i
|
||||
title: Replace CI pipeline with test suite
|
||||
status: completed
|
||||
type: task
|
||||
priority: normal
|
||||
created_at: 2026-02-21T13:01:01Z
|
||||
updated_at: 2026-02-21T13:10:15Z
|
||||
---
|
||||
|
||||
Replace the current `.github/workflows/ci.yml` with a workflow that runs the actual test suites. The existing jobs (lint, format, type check) are already enforced by pre-commit hooks (prek), so CI should focus on test execution instead.
|
||||
|
||||
## Context
|
||||
|
||||
- **Backend integration tests**: pytest with `TEST_DATABASE_URL` pointing at a postgres service container. Default URL: `postgresql+asyncpg://postgres:postgres@localhost:5433/nuzlocke_test`. Tests live in `backend/tests/`.
|
||||
- **Frontend unit tests**: vitest (`npm run test -- --run`). No external services needed.
|
||||
- **E2e tests**: Playwright. `e2e/global-setup.ts` uses `docker compose -p nuzlocke-test -f docker-compose.test.yml up -d --build` to start a test API + DB, then seeds data via the API. `playwright.config.ts` spins up `npm run dev` as the webServer. Need to install Chromium via `npx playwright install --with-deps chromium`.
|
||||
|
||||
## Checklist
|
||||
|
||||
- [x] Add `backend-tests` job: postgres service container (image postgres:16-alpine, user/pass/db matching conftest defaults), install deps with `uv`, run `pytest backend/tests/ -q`
|
||||
- [x] Add `frontend-tests` job: node 24, `npm ci` in `frontend/`, run `npm run test -- --run`
|
||||
- [x] Add `e2e-tests` job: install Docker Compose, install Playwright + Chromium deps, run `npx playwright test` from `frontend/`; upload HTML report as artifact on failure
|
||||
- [x] Keep the `actions-lint` job (actionlint + zizmor); remove `backend-lint` and `frontend-lint` jobs
|
||||
- [x] Pin all action versions to SHA with version comments; pass `zizmor` audit
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-yzpb
|
||||
title: Implement Unit & Integration Tests
|
||||
status: todo
|
||||
status: completed
|
||||
type: epic
|
||||
priority: high
|
||||
created_at: 2026-02-10T09:32:47Z
|
||||
updated_at: 2026-02-21T11:29:02Z
|
||||
updated_at: 2026-02-21T13:00:44Z
|
||||
---
|
||||
|
||||
Add comprehensive unit and integration test coverage to both the backend (FastAPI/Python) and frontend (React/TypeScript). The project currently has zero tests — pytest is configured in pyproject.toml with pytest-asyncio and httpx, but no actual test files exist. The frontend has no test tooling at all.
|
||||
@@ -21,7 +21,7 @@ Add comprehensive unit and integration test coverage to both the backend (FastAP
|
||||
## Success Criteria
|
||||
|
||||
- [x] Backend test infrastructure is set up (conftest, fixtures, test DB)
|
||||
- [ ] Backend schemas and services have unit test coverage
|
||||
- [x] Backend schemas and services have unit test coverage
|
||||
- [x] Backend API endpoints have integration test coverage
|
||||
- [x] Frontend test infrastructure is set up (Vitest, RTL)
|
||||
- [x] Frontend utilities and hooks have unit test coverage
|
||||
|
||||
Reference in New Issue
Block a user