682dedb4b4
CI / test (pull_request) Successful in 9s
- 新建 pytest.ini 统一 test discovery(tests/ + skills/ir_generation_skill/tests/) - test_step1~3 转换为 pytest 兼容格式,无输出文件时自动 skip - 新增 tests/test_detect_conflicts.py(18 个纯函数单测) - 新增 tests/test_config.py(7 个配置模块单测) - CI 改为 pytest -v 使用 pytest.ini testpaths - DEV_AGENT.md 新增 PR 提交规范 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35 lines
860 B
YAML
35 lines
860 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: shell
|
|
steps:
|
|
- name: Checkout code from Gitea
|
|
run: |
|
|
git clone --depth 1 http://localhost:3000/pzhang_zywl/document_analyzer.git .
|
|
git fetch origin ${{ github.sha }}
|
|
git checkout ${{ github.sha }}
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Run tests
|
|
run: python -m pytest -v
|
|
|
|
- name: Create issue on failure
|
|
if: failure()
|
|
env:
|
|
GITEA_API_TOKEN: ${{ secrets.D }}
|
|
run: >-
|
|
python scripts/create_failure_issue.py
|
|
--sha "${{ github.sha }}"
|
|
--branch "${{ github.ref_name }}"
|
|
--run "${{ github.run_number }}"
|
|
--message "${{ github.event.head_commit.message }}"
|