Skip to content

Commit d3b205c

Browse files
committed
chore: defer codecov notify until all jobs done
1 parent 27e8773 commit d3b205c

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
@@ -112,10 +112,30 @@ jobs:
112112
run: npm run build
113113
working-directory: tests/app/rp
114114

115+
codecov-notify:
116+
needs:
117+
- test-package
118+
- test-demo-rp
119+
runs-on: ubuntu-latest
120+
name: Codecov Notify
121+
steps:
122+
# - tell codecov to send notifications now that all jobs are complete.
123+
# without this, codecov may notify before all coverage reports have been uploaded.
124+
# `codecov: notify: manual_trigger: true` must be set in codecov.yml, to prevent
125+
# processing on every upload.
126+
# - preferred to after_n_builds so we don't need to update that number every
127+
# time we add/remove jobs.
128+
- name: Notify Codecov
129+
uses: codecov/codecov-action@v5
130+
with:
131+
run_command: 'send-notifications'
132+
use_oidc: true
133+
115134
success:
116135
needs:
117136
- test-package
118137
- test-demo-rp
138+
- codecov-notify
119139
runs-on: ubuntu-latest
120140
name: Test successful
121141
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)