a8964db151
CI / test (pull_request) Successful in 18s
- 新增 _get_gitea_config.py 从 YAML 读取 URL/repo/token
- _common.sh 改为通过 eval python 脚本加载配置
- GITEA_CICD_SETUP.md / DEV_AGENT.md / QE_AGENT.md 更新文档
- CI 工作流改用 ${{ gitea.server_url }} / ${{ gitea.repository }}
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
65 lines
2.5 KiB
YAML
65 lines
2.5 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 ${{ gitea.server_url }}/${{ gitea.repository }}.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 }}" \
|
|
--gitea-url "${{ gitea.server_url }}" \
|
|
--repo "${{ gitea.repository }}" \
|
|
--message "QE Acceptance: ${SUMMARY:-pipeline failed}" \
|
|
--workflow "QE Acceptance" \
|
|
--labels "acceptance-failure,agent-task"
|