Logo
Explore Help
Register Sign In
niuniu/gaokao-volunteer-system
1
0
Fork 0
You've already forked gaokao-volunteer-system
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
9510fd16ecda20f40803c5393009a06bd4c5b979
gaokao-volunteer-system/pytest.ini

13 lines
308 B
INI
Raw Normal View History

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
[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
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 21ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API