mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
The custom TypeScript implementation used Math.max for hit counts when merging per-shard LCOV files. This is incorrect — each shard runs a different subset of tests, so hit counts should be summed to reflect total executions across the full test suite. Replace with `lcov -a` which is the industry-standard tool for merging LCOV tracefiles. It correctly sums DA/BRDA/FNDA hit counts and handles edge cases (branch ID collisions, function aliases) that a hand-rolled parser will miss. Also closes #10930 which was superseded by this PR.
74 lines
2.1 KiB
YAML
74 lines
2.1 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: Install lcov
|
|
run: sudo apt-get install -y -qq lcov
|
|
|
|
- name: Merge shard coverage into single LCOV
|
|
run: |
|
|
mkdir -p coverage/playwright
|
|
LCOV_FILES=$(find temp/coverage-shards -name 'coverage.lcov' -type f)
|
|
if [ -z "$LCOV_FILES" ]; then
|
|
echo "No coverage.lcov files found"
|
|
touch coverage/playwright/coverage.lcov
|
|
exit 0
|
|
fi
|
|
ADD_ARGS=""
|
|
for f in $LCOV_FILES; do ADD_ARGS="$ADD_ARGS -a $f"; done
|
|
lcov $ADD_ARGS -o 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
|