11name : ' CI: E2E Coverage'
22
33on :
4+ workflow_call :
5+ inputs :
6+ source_branch :
7+ required : true
8+ type : string
9+ source_pr :
10+ required : false
11+ type : string
12+ source_run_id :
13+ required : true
14+ type : string
15+ source_sha :
16+ required : true
17+ type : string
18+ secrets :
19+ CODECOV_TOKEN :
20+ required : true
421 workflow_run :
522 workflows : ['CI: Tests E2E']
623 types :
724 - completed
825
926concurrency :
10- group : e2e-coverage-${{ github.event.workflow_run.head_sha }}
27+ group : e2e-coverage-${{ inputs.source_sha || github.event.workflow_run.head_sha }}
1128 cancel-in-progress : true
1229
1330permissions :
1835 # Not gated on full success: fail-fast:false means one flaky shard flips the whole run to failure, which would skip merging every other shard's real coverage.
1936 if : >
2037 github.repository == 'Comfy-Org/ComfyUI_frontend' &&
38+ (github.event_name == 'workflow_call' ||
39+ github.event.workflow_run.event != 'pull_request' ||
40+ github.event.workflow_run.head_repository.full_name != github.repository ||
41+ github.event.workflow_run.actor.login == 'dependabot[bot]') &&
2142 github.event.workflow_run.conclusion != 'cancelled'
2243 runs-on : ubuntu-latest
2344 timeout-minutes : 10
@@ -28,15 +49,15 @@ jobs:
2849 - name : Checkout sources for genhtml
2950 uses : actions/checkout@v7
3051 with :
31- ref : ${{ github.event.workflow_run.head_sha }}
52+ ref : ${{ inputs.source_sha || github.event.workflow_run.head_sha }}
3253 sparse-checkout : |
3354 src
3455 packages
3556
3657 - name : Download all shard coverage data
3758 uses : dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
3859 with :
39- run_id : ${{ github.event.workflow_run.id }}
60+ run_id : ${{ inputs.source_run_id || github.event.workflow_run.id }}
4061 name : e2e-coverage-shard-.*
4162 name_is_regexp : true
4263 path : temp/coverage-shards
@@ -123,9 +144,9 @@ jobs:
123144 with :
124145 files : coverage/playwright/coverage.lcov
125146 flags : e2e
126- override_branch : ${{ github.event.workflow_run.head_branch }}
127- override_commit : ${{ github.event.workflow_run.head_sha }}
128- override_pr : ${{ github.event.workflow_run.pull_requests[0].number }}
147+ override_branch : ${{ inputs.source_branch || github.event.workflow_run.head_branch }}
148+ override_commit : ${{ inputs.source_sha || github.event.workflow_run.head_sha }}
149+ override_pr : ${{ inputs.source_pr || github.event.workflow_run.pull_requests[0].number }}
129150 token : ${{ secrets.CODECOV_TOKEN }}
130151 fail_ci_if_error : false
131152
0 commit comments