chore(P14-8): 完成运营化与验收收口

这个提交包含在:
2026-03-06 23:24:16 +08:00
父节点 b50b084100
当前提交 d8fff0ba21
共修改 28 个文件,包含 2820 行新增和 123 行删除
+6
查看文件
@@ -35,3 +35,9 @@ jobs:
- name: Run minimal checks
run: ./scripts/check-minimal.sh
- name: Inspect vitest coverage
working-directory: server
run: |
npm run test:coverage
node ../scripts/coverage_gate.js --mode=ci
+49
查看文件
@@ -83,6 +83,34 @@ jobs:
mkdir -p "$REGRESSION_REPORT_DIR"
RUN_AUDIT_REGRESSION=1 RUN_OCR_REGRESSION=1 ./scripts/regression-all.sh --json-report "$REGRESSION_REPORT_DIR/report.json"
- name: Generate Job Summary
if: always()
run: |
if [[ -f "$REGRESSION_REPORT_DIR/report.json" ]]; then
python3 -c "
import json, os
try:
with open('$REGRESSION_REPORT_DIR/report.json') as f:
d = json.load(f)
ov = d.get('overall', {})
summary = f'## Regression Run Status: {ov.get(\"status\")}\\n'
summary += f'- Passed: {ov.get(\"passed\")} | Failed: {ov.get(\"failed\")} | Skipped: {ov.get(\"skipped\")}\\n'
summary += f'- Duration: {ov.get(\"duration_ms\")} ms\\n\\n'
failed = [s for s in d.get('steps', []) if s.get('status') == 'failed']
if failed:
summary += '### Failed Steps\\n'
for s in failed:
summary += f'- **{s.get(\"name\")}** (exit {s.get(\"exit_code\")})\\n'
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as out:
out.write(summary)
except Exception as e:
with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as out:
out.write(f'❌ Failed to parse report: {e}')
"
else:
echo "❌ Regression JSON report not found." >> $GITHUB_STEP_SUMMARY
fi
- name: Upload regression report artifact
if: always()
uses: actions/upload-artifact@v4
@@ -91,6 +119,27 @@ jobs:
path: /tmp/hyb-oa-regression/report.json
if-no-files-found: warn
- name: Generate CFR Report
if: always()
run: |
mkdir -p artifacts/regression
if [[ -f "$REGRESSION_REPORT_DIR/report.json" ]]; then
cp "$REGRESSION_REPORT_DIR/report.json" artifacts/regression/
fi
python3 scripts/cfr_report.py --input-dir artifacts/regression --window 7d,30d --output-json /tmp/cfr.json --output-md /tmp/cfr.md
echo "## Change Failure Rate" >> $GITHUB_STEP_SUMMARY
cat /tmp/cfr.md >> $GITHUB_STEP_SUMMARY
- name: Upload CFR report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: cfr-report-${{ github.run_id }}-${{ github.sha }}
path: |
/tmp/cfr.json
/tmp/cfr.md
if-no-files-found: warn
- name: Stop server
if: always()
run: |