fix: generate JSON reports alongside HTML for test count extraction

- Add JSON reporter to Playwright test runs
- Generate report.json alongside HTML reports
- Store JSON report in playwright-report directory
- This enables accurate test count extraction from CI artifacts

The HTML reports alone don't contain easily extractable test statistics
as they use a React app with dynamically loaded data. JSON reports
provide direct access to test counts.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
snomiao
2025-09-09 23:43:57 +00:00
parent c7668ea5db
commit e8e30030a5

View File

@@ -229,8 +229,10 @@ jobs:
- name: Run Playwright tests (${{ matrix.browser }})
id: playwright
run: npx playwright test --project=${{ matrix.browser }} --reporter=html
run: npx playwright test --project=${{ matrix.browser }} --reporter=html --reporter=json
working-directory: ComfyUI_frontend
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/report.json
- uses: actions/upload-artifact@v4
if: always()
@@ -275,8 +277,13 @@ jobs:
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports
run: |
npx playwright merge-reports --reporter html --reporter json ./all-blob-reports
# Move JSON report to the HTML report directory for easier access
[ -f "report.json" ] && mv report.json playwright-report/report.json
working-directory: ComfyUI_frontend
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: report.json
- name: Upload HTML report
uses: actions/upload-artifact@v4