Skip to content

Add pytest-cov coverage reporting to CI - #59

Open
qiaobochi040726-source wants to merge 2 commits into
BreachDirect:mainfrom
qiaobochi040726-source:20260806-pytest-cov
Open

Add pytest-cov coverage reporting to CI#59
qiaobochi040726-source wants to merge 2 commits into
BreachDirect:mainfrom
qiaobochi040726-source:20260806-pytest-cov

Conversation

@qiaobochi040726-source

Copy link
Copy Markdown
Contributor

Fixes #28

  • pyproject.toml:dev 依赖加 pytest-cov>=4.0;[tool.coverage.run] source=["stellargate"](omit tests)
  • 新增 .github/workflows/test.yml:push/PR 触发,Python 3.10/3.11 matrix,pytest --cov=stellargate --cov-fail-under=60,上传 .coverage 报告
  • 覆盖率参数只放 CI,不进 pyproject addopts,本地裸跑 pytest 不受影响

验证:本地实测 Total coverage 62.28%(阈值 60 达标),15 passed。遗留:cli.py 覆盖率为 0%(无 CLI 层测试),后续加测试可上调阈值。

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-cov coverage reporting to CI

2 participants