[Phase 1] CI pipeline, linting, and test harness - #19
Merged
Merged
Conversation
- .github/workflows/ci.yml: two jobs (python, javascript) triggered on PR and push to main - Python: Ruff lint + format, pytest --cov ≥80%, pip-audit for HIGH CVEs - JS/TS: ESLint v9, Prettier check, Vitest coverage, npm audit --audit-level=high - Both jobs enforce no bare noqa/eslint-disable without inline justification comments - backend/app/main.py: migrate from deprecated on_event to lifespan context manager - backend/app/db.py: Ruff import sort fix - backend/tests/test_main.py: health endpoint, OpenAPI schema, docs — 100% coverage - backend/tests/test_db.py: table creation, CRUD, cascade delete, get_db dependency - frontend/eslint.config.js: ESLint v9 flat config with globals.browser, entry-file override - frontend/package.json: upgrade to ESLint v9, @typescript-eslint v8, react-hooks v5 - frontend/tests/smoke.test.ts: initial Vitest smoke tests (theme tokens, jsdom env) - Prettier-formatted all frontend src files Closes #3
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.
Summary
.github/workflows/ci.yml: two parallel jobs triggered on every PR and push tomain# noqaguard → pytest--cov ≥80%→ pip-audit (HIGH fail)eslint-disableguard → Vitest coverage → npm audit--audit-level=highbackend/app/main.py: migrated from deprecatedon_eventtolifespancontext managertest_main.py(health, OpenAPI, docs),test_db.py(table creation, column schema, CRUD, cascade delete,get_dbdependency) — allunit/integrationmarked, in-memory SQLite only, no live I/Osmoke.test.ts— jsdom env + theme token contract testglobals.browser, entry-file override forreact-refreshsrc/filesChecks (verified locally)
ruff check+ruff format --check— cleanpytest -m "unit or integration" --cov-fail-under=80— 12 passed, 100% coverageeslint src— 0 errors, 0 warningsprettier --check— all files formattedvitest run— 2 passedCloses #3