Skip to content

Commit a7f0138

Browse files
committed
chore: defer codecov notify until all jobs done
1 parent 32c601a commit a7f0138

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,32 @@ jobs:
117117
run: npm run build
118118
working-directory: tests/app/rp
119119

120+
codecov-notify:
121+
needs:
122+
- test-package
123+
- test-demo-rp
124+
runs-on: ubuntu-latest
125+
name: Codecov Notify
126+
permissions:
127+
id-token: write # Required for Codecov OIDC token
128+
steps:
129+
# - tell codecov to send notifications now that all jobs are complete.
130+
# without this, codecov may notify before all coverage reports have been uploaded.
131+
# `codecov: notify: manual_trigger: true` must be set in codecov.yml, to prevent
132+
# processing on every upload.
133+
# - preferred to after_n_builds so we don't need to update that number every
134+
# time we add/remove jobs.
135+
- name: Notify Codecov
136+
uses: codecov/codecov-action@v5
137+
with:
138+
run_command: 'send-notifications'
139+
use_oidc: true
140+
120141
success:
121142
needs:
122143
- test-package
123144
- test-demo-rp
145+
- codecov-notify
124146
runs-on: ubuntu-latest
125147
name: Test successful
126148
steps:

codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
codecov:
3+
# since we're uploading coverage from multiple parallel jobs,Codecov doesn't
4+
# inherently know when all reports have been uploaded for a given commit. To
5+
# prevent premature processing and ensure a complete report, we send
6+
# notification when all jobs are done.
7+
notify:
8+
manual_trigger: true

0 commit comments

Comments
 (0)