Files
document_analyzer/.gitea/workflows/acceptance.yml
T
pzhang_zywl 2b5d901cfe
CI / test (push) Successful in 18s
fix: 更新 repo 路径 pzhang_zywl → zeekrAI 组织
创建 zeekrAI 组织并将 document_analyzer 转移至其下。
更新所有文件中的 repo 路径和 git remote。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 15:50:45 +08:00

63 lines
2.4 KiB
YAML

name: QE Acceptance Tests
on:
workflow_dispatch:
inputs:
prd_path:
description: 'Path to .docx PRD file (absolute)'
required: false
default: ''
parsed_path:
description: 'Path to pre-parsed _updated.json (skip doc_parser if set)'
required: false
default: ''
acceptance_runs:
description: 'Layer B stability runs (1 = skip)'
required: false
default: '1'
jobs:
acceptance:
runs-on: shell
timeout-minutes: 60
steps:
- name: Checkout main branch
run: |
git clone --depth 1 https://git.zywl.me/zeekrAI/document_analyzer.git .
git checkout main
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run pipeline + acceptance tests
run: |
if [ -n "${{ github.event.inputs.prd_path }}" ]; then
python scripts/run_pipeline.py --input "${{ github.event.inputs.prd_path }}" --test
elif [ -n "${{ github.event.inputs.parsed_path }}" ]; then
python scripts/run_pipeline.py --parsed "${{ github.event.inputs.parsed_path }}" --test
else
# No input provided — run acceptance on existing output if present
python -m pytest tests/acceptance/ -v --run-acceptance \
--acceptance-runs=${{ github.event.inputs.acceptance_runs }} --tb=short
fi
env:
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
- name: Create issue on failure
if: failure()
env:
GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
# Read acceptance report summary if it exists
if [ -f acceptance-report.json ]; then
SUMMARY=$(python -c "import json; r=json.load(open('acceptance-report.json')); print(r.get('final_verdict','?'))")
DETAILS=$(python -c "import json; r=json.load(open('acceptance-report.json')); fd=r.get('failure_details',[]); print('\\n'.join(f'- {d}' for d in fd) if fd else '')")
fi
python scripts/create_failure_issue.py \
--sha "${{ github.sha }}" --branch "main" \
--run "${{ github.run_number }}" \
--message "QE Acceptance: ${SUMMARY:-pipeline failed}" \
--workflow "QE Acceptance" \
--labels "acceptance-failure,agent-task"