搜索

PythonReactSEOPDF
GitHub Skill

test-runner

Automated test execution before commits to prevent broken code from entering the repository. Use when user wants to run tests, is about to commit, or before creating a PR.

edri2or-commits☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Test Runner

Mission: Zero Broken Commits - no code committed if tests fail.


Current Test Results (Auto-Executed)

Test Suite Output
!`python -m pytest tests/ -v --tb=short 2>&1 | tail -80`
Test Count Summary
!`python -m pytest tests/ --co -q 2>&1 | tail -5`

Analysis Instructions

Based on the test results above:

If ALL TESTS PASSED:
## ✅ All Tests Passed

**Summary:** [X] tests passed in [Y]s
**Status:** Safe to commit ✅
If TESTS FAILED:
## ❌ Tests Failed

**Summary:** [X] passed, [Y] failed

**Failed Tests:**
1. `test_file.py::test_name` - Line [N]
   - Error: [error message]

**Status:** ⚠️ DO NOT COMMIT - Fix tests first

**Next Steps:**
1. Review failed test at [file:line]
2. Fix the issue
3. Run tests again: `/test-runner`

Constraints

DO NOT:

  • Modify test code - only run and report
  • Modify source code - only report results
  • Skip failing tests - all must pass
  • Recommend committing with failures

ALWAYS:

  • Report all failures with file paths and line numbers
  • Block commit if tests fail
  • Show execution time

Coverage Report (On Request)

If user asks for coverage:

python -m pytest --cov=src --cov-report=term-missing -v

Troubleshooting

For common issues, see troubleshooting.md


Integration

Works with:

  • preflight-check: Tests run as part of preflight
  • pr-helper: Tests must pass before PR creation
  • CI (test.yml): Validates in clean environment after push
Code changes → test-runner ✅ → commit → push → CI validates

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!