mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
When the same source file appears in multiple shards, naive concatenation double-counts LF:/LH: counters. Add scripts/merge-lcov.ts that unions DA: records per source file (max hit count per line) and recomputes summary counters from merged data. Also fix coverage-report.ts and coverage-slack-notify.ts to deduplicate per-file stats using Math.max instead of summing, making them robust against unmerged LCOV input.
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: 'CI: E2E Coverage'
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ['CI: Tests E2E']
|
|
types:
|
|
- completed
|
|
|
|
concurrency:
|
|
group: e2e-coverage-${{ github.event.workflow_run.head_sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
merge:
|
|
if: >
|
|
github.repository == 'Comfy-Org/ComfyUI_frontend' &&
|
|
github.event.workflow_run.conclusion == 'success'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
|
|
- name: Download all shard coverage data
|
|
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
|
|
with:
|
|
run_id: ${{ github.event.workflow_run.id }}
|
|
name: e2e-coverage-shard-.*
|
|
name_is_regexp: true
|
|
path: temp/coverage-shards
|
|
if_no_artifact_found: warn
|
|
|
|
- name: Merge shard coverage into single LCOV
|
|
run: |
|
|
mkdir -p coverage/playwright
|
|
pnpm exec tsx scripts/merge-lcov.ts temp/coverage-shards coverage/playwright/coverage.lcov
|
|
wc -l coverage/playwright/coverage.lcov
|
|
|
|
- name: Upload merged coverage data
|
|
if: always()
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: e2e-coverage
|
|
path: coverage/playwright/
|
|
retention-days: 30
|
|
if-no-files-found: warn
|
|
|
|
- name: Upload E2E coverage to Codecov
|
|
if: always()
|
|
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
|
|
with:
|
|
files: coverage/playwright/coverage.lcov
|
|
flags: e2e
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: false
|