Files
gaokao-volunteer-system/pytest.ini
hermes-ops b4ecad2130
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(ci): T10.1 GitHub Actions 多 Python 版本自动化测试
- .github/workflows/ci.yml: CI 流水线
  - 触发器: push / pull_request 到 main
  - 矩阵: Python 3.10 / 3.11 / 3.12
  - fail-fast: false(单版本失败不影响其他)
  - concurrency: 取消同分支旧运行
  - steps: checkout / setup-python / pip cache / 安装依赖 / 运行 pytest+coverage / 上传 coverage 产物
- pytest.ini: 统一测试发现(tests + data/*/tests),与 CI 行为一致
- requirements-dev.txt: 测试依赖最小集(pytest / pytest-cov / pytest-timeout / pytest-xdist)
- README.md: 顶部增加 CI 状态徽章
- .gitignore: 忽略 .coverage.* / coverage.xml

覆盖率硬门槛(--cov-fail-under)留待 T5.5,避免在 T10.1 阶段被尚未补齐的脚本/分享模块测试阻断。
本任务产出 coverage.xml 供 T10.2 codecov 集成使用。
2026-06-12 10:51:35 +08:00

13 lines
308 B
INI
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[pytest]
# 统一的测试发现规则(本地与 CI 行为一致)
testpaths = tests data
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
# 输出
addopts = -ra --strict-markers --tb=short
# 超时:单个测试 30s防止 CI 因卡死浪费资源)
timeout = 30