feat: deploy E2E coverage HTML report to GitHub Pages

Generate a browsable HTML coverage report using genhtml after merging
shard LCOVs. On main, deploy it to GitHub Pages so the team can
inspect per-file coverage without downloading artifacts.

The HTML report is also uploaded as an artifact (e2e-coverage-html)
for PR runs where Pages deployment is skipped.

Requires GitHub Pages to be enabled in repo settings with source set
to GitHub Actions.
This commit is contained in:
bymyself
2026-04-15 18:57:08 -07:00
parent a8e1fa8bef
commit 1fc5f9d715

View File

@@ -12,6 +12,8 @@ concurrency:
permissions:
contents: read
pages: write
id-token: write
jobs:
merge:
@@ -71,3 +73,41 @@ jobs:
flags: e2e
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: Generate HTML coverage report
run: |
genhtml coverage/playwright/coverage.lcov \
-o coverage/html \
--title "ComfyUI E2E Coverage" \
--no-function-coverage \
--precision 1
- name: Upload HTML report artifact
uses: actions/upload-artifact@v6
with:
name: e2e-coverage-html
path: coverage/html/
retention-days: 30
deploy:
needs: merge
if: github.event.workflow_run.head_branch == 'main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download HTML report
uses: actions/download-artifact@v7
with:
name: e2e-coverage-html
path: coverage/html
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: coverage/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4