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"