Skip to content

[Phase 1] CI pipeline, linting, and test harness - #19

Merged
reloadfast merged 2 commits into
mainfrom
feature/phase-1-ci
Feb 27, 2026
Merged

reloadfast merged 2 commits into
mainfrom
feature/phase-1-ci

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Summary

  • .github/workflows/ci.yml: two parallel jobs triggered on every PR and push to main
  • Python job: Ruff lint → Ruff format check → bare # noqa guard → pytest --cov ≥80% → pip-audit (HIGH fail)
  • JS job: ESLint v9 → Prettier check → bare eslint-disable guard → Vitest coverage → npm audit --audit-level=high
  • backend/app/main.py: migrated from deprecated on_event to lifespan context manager
  • Backend tests (12 tests, 100% coverage): test_main.py (health, OpenAPI, docs), test_db.py (table creation, column schema, CRUD, cascade delete, get_db dependency) — all unit/integration marked, in-memory SQLite only, no live I/O
  • Frontend tests: smoke.test.ts — jsdom env + theme token contract test
  • ESLint v9 flat config with globals.browser, entry-file override for react-refresh
  • Prettier-formatted all src/ files

Checks (verified locally)

  • ruff check + ruff format --check — clean
  • pytest -m "unit or integration" --cov-fail-under=80 — 12 passed, 100% coverage
  • eslint src — 0 errors, 0 warnings
  • prettier --check — all files formatted
  • vitest run — 2 passed

Closes #3

- .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
@reloadfast
reloadfast merged commit 558f485 into main Feb 27, 2026
1 of 2 checks passed
@reloadfast
reloadfast deleted the feature/phase-1-ci branch February 27, 2026 18:46
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.

[Phase 1] CI pipeline, linting, and test harness

1 participant