Skip to content

Quality gates: coverage, pre-commit, markers, e2e tests#16

Merged
manavgup merged 6 commits into
mainfrom
quality-gates/coverage-precommit-markers-e2e
Apr 6, 2026
Merged

Quality gates: coverage, pre-commit, markers, e2e tests#16
manavgup merged 6 commits into
mainfrom
quality-gates/coverage-precommit-markers-e2e

Conversation

@manavgup
Copy link
Copy Markdown
Owner

@manavgup manavgup commented Apr 6, 2026

Summary

  • Add 85% coverage threshold enforced in make test via pytest-cov
  • Add pre-commit hooks (ruff, black, AST check, debug statements, private key detection, YAML/TOML validation)
  • Add pytest markers (unit, integration, e2e, slow) with make test-unit, make test-integration, make test-e2e targets
  • Add e2e smoke test that scaffolds a full project and validates all generated code
  • Improve Makefile with venv, install-dev, update, coverage, clean-all targets

Borrowed best practices from IBM/mcp-context-forge.

Closes #10, #11, #12, #13

Test plan

  • make install-dev — creates venv, installs deps, installs hooks
  • make check — lint + typecheck + 343 tests at 89% coverage
  • make test-unit — 175 tests
  • make test-integration — 162 tests
  • make test-e2e — 6 tests
  • make pre-commit — all 12 hooks pass
  • make help — shows all targets

🤖 Generated with Claude Code

manavgup and others added 6 commits April 6, 2026 11:54
…oke test

- Add pytest-cov with 85% coverage threshold enforced in `make test`
- Add .pre-commit-config.yaml (ruff, black, trailing whitespace, AST check,
  debug statements, private key detection, YAML/TOML validation)
- Add pytest markers: unit (core+templates), integration (CLI), e2e (scaffold)
- Add e2e smoke test validating full project scaffold output
- Makefile: add venv, install-dev, update, test-unit, test-integration,
  test-e2e, test-fast, coverage, pre-commit, clean-all targets

Closes #10, #11, #12, #13

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Test job now enforces 85% coverage threshold and uploads coverage.xml
- Add pre-commit job using pre-commit/action (caches hook envs)
- Cache Poetry dependencies across all jobs
- Skip draft PRs, cancel stale runs
- Python matrix ready to expand to 3.13

Closes #15

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Makefile: adopt ContextForge help system with section headers and
  emoji-prefixed categories (🌱 Installation, 🧪 Testing, 🔍 Quality, 🧹 Cleanup)
- Makefile: add strict shell flags (-eu -o pipefail), project variables,
  author attribution
- CI: add proper file headers with author and job descriptions
- CI: add shared env block, section comments for each job
- Dependency review: match documentation style

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add file-level doc blocks explaining what each workflow does
- Add references section with links to tools
- Add author attribution (Manav Gupta)
- Add emoji-prefixed step names matching ContextForge conventions
- Add inline section comments (Setup, Checks, Build & Validate)
- Add principle-of-least-privilege permission comments
- Extract PYTHON_VERSION to shared env block
- Dependency review: add comment-summary-in-pr on failure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-review

- lint.yml: ruff + black + mypy (path-filtered to **.py and pyproject.toml)
- pre-commit.yml: all pre-commit hooks on PRs only
- ci.yml → tests & package only (renamed to "Tests & Package")
- dependency-review.yml: unchanged (already separate)

Each workflow appears as an independent check on PRs, matching
the ContextForge pattern of modular workflow files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@manavgup manavgup merged commit 056c847 into main Apr 6, 2026
6 checks passed
@manavgup manavgup deleted the quality-gates/coverage-precommit-markers-e2e branch April 6, 2026 18:30
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.

Add pytest coverage threshold to CI gate

1 participant