Testing
CI runs both suites before building images. Run them locally to match.
Backend
cd backend
. .venv/bin/activate # or your active environment
pytestTests live under backend/tests/. pytest.ini sets pythonpath = backend so imports resolve to app.* without an editable install.
To compare PostgreSQL major versions locally, start disposable instances and create two databases on each. Point DATABASE_URL at the disposable migration database and run alembic upgrade head, alembic downgrade base, and alembic upgrade head. Then set POSTGRES_MIGRATION_TEST=1 and run pytest tests/test_postgres_migrations.py. The native ingestion concurrency regression uses two independent sessions and checks that PostgreSQL resolves a real conflict against the migrated index. For ordinary database-backed fixtures, set POSTGRES_FIXTURE_URL to a loopback postgresql+asyncpg URL for the separate usage_dashboard_test database. The fixture role must be able to create and remove schemas. Ordinary fixtures create their own schema from model metadata; they do not replace the separate Alembic check. Without POSTGRES_FIXTURE_URL, ordinary fixtures use SQLite. Never set either URL to a live database.
Frontend
cd frontend
npm ci
npm run test # vitest run
npm run lint # eslint .
npm run build # vite buildUnit tests are Vitest specs colocated with the code (e.g. src/lib/*.test.js).
CI
.github/workflows/docker-images.yml runs pytest, the frontend test/lint/build checks, and then builds both images on push to main and on tags.