@@ -209,11 +209,9 @@ jobs:
209209 name : coverage_${{ matrix.suffix }}_${{ matrix.arch }}
210210 path : ${{ github.workspace }}/Debug/coverage-${{ matrix.suffix }}-${{ matrix.arch }}.json
211211
212- upload -coverage :
212+ generate -coverage :
213213 needs : [ coverage ]
214214 runs-on : ubuntu-24.04
215- environment :
216- name : dd-protected-coverage
217215 steps :
218216 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
219217 with :
@@ -223,18 +221,14 @@ jobs:
223221 with :
224222 path : artifacts
225223
226- - uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
227- with :
228- node-version : 24
229-
230224 - name : Install dependencies
231225 run : |
232226 sudo apt update
233227 sudo apt install -y python3 python3-venv python3-pip
234228 python3 -m venv .venv
235229 source .venv/bin/activate
236230 pip install gcovr==7.2
237- npm install -g @datadog/datadog-ci
231+
238232 - name : Generate coverage
239233 run : |
240234 source .venv/bin/activate
@@ -243,10 +237,28 @@ jobs:
243237 mkdir -p coverage
244238 gcovr --merge-mode-functions merge-use-line-0 --json-add-tracefile "artifacts/*/coverage-*.json" --html-details coverage/coverage.html
245239
246- - name : Submit coverage (DataDog)
247- run : datadog-ci coverage upload coverage.xml
248- env :
249- DD_API_KEY : ${{ secrets.DD_API_KEY }}
240+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
241+ with :
242+ name : coverage
243+ path : ${{ github.workspace }}/coverage/
244+
245+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
246+ with :
247+ name : coverage-xml
248+ path : ${{ github.workspace }}/coverage.xml
249+
250+ upload-to-codecov :
251+ needs : [ generate-coverage ]
252+ runs-on : ubuntu-24.04
253+ steps :
254+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
255+ with :
256+ submodules : recursive
257+
258+ - uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
259+ with :
260+ name : coverage-xml
261+ path : .
250262
251263 - name : Submit coverage (CodeCov)
252264 uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
@@ -255,10 +267,34 @@ jobs:
255267 flags : waf_test
256268 verbose : true
257269 files : coverage.xml
258- - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
270+
271+ upload-to-datadog :
272+ needs : [ generate-coverage ]
273+ runs-on : ubuntu-24.04
274+ if : github.ref == 'refs/heads/master'
275+ environment :
276+ name : dd-protected-coverage
277+ steps :
278+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
259279 with :
260- name : coverage
261- path : ${{ github.workspace }}/coverage/
280+ submodules : recursive
281+
282+ - uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
283+ with :
284+ name : coverage-xml
285+ path : .
286+
287+ - uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
288+ with :
289+ node-version : 24
290+
291+ - name : Install datadog-ci
292+ run : npm install -g @datadog/datadog-ci
293+
294+ - name : Submit coverage (DataDog)
295+ run : datadog-ci coverage upload coverage.xml
296+ env :
297+ DD_API_KEY : ${{ secrets.DD_API_KEY }}
262298
263299 lint :
264300 runs-on : ubuntu-24.04
0 commit comments