Skip to content

Commit ef7ca6d

Browse files
authored
chore: defer codecov notify until all jobs done (#1614)
1 parent 32c601a commit ef7ca6d

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,30 @@ 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+
steps:
127+
# - tell codecov to send notifications now that all jobs are complete.
128+
# without this, codecov may notify before all coverage reports have been uploaded.
129+
# `codecov: notify: manual_trigger: true` must be set in codecov.yml, to prevent
130+
# processing on every upload.
131+
# - preferred to after_n_builds so we don't need to update that number every
132+
# time we add/remove jobs.
133+
- name: Notify Codecov
134+
uses: codecov/codecov-action@v5
135+
with:
136+
run_command: 'send-notifications'
137+
use_oidc: true
138+
120139
success:
121140
needs:
122141
- test-package
123142
- test-demo-rp
143+
- codecov-notify
124144
runs-on: ubuntu-latest
125145
name: Test successful
126146
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)