@@ -13,9 +13,6 @@ permissions:
1313jobs :
1414 test-coverage :
1515 environment : runtime
16- permissions :
17- contents : read
18- id-token : write # Upload coverage to Codecov via OIDC.
1916 runs-on :
2017 group : databrickslabs-protected-runner-group
2118 labels : linux-ubuntu-latest
@@ -52,14 +49,12 @@ jobs:
5249 covr::to_cobertura(cov)
5350 shell : Rscript {0}
5451
55- - uses : codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2
52+ - name : Upload coverage report
53+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5654 with :
57- # Fail if error if not on PR, or if on PR and token is given
58- fail_ci_if_error : ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
59- files : ./cobertura.xml
60- plugins : noop
61- disable_search : true
62- use_oidc : true
55+ name : coverage-report
56+ path : cobertura.xml
57+ if-no-files-found : error
6358
6459 - name : Show testthat output
6560 if : always()
7469 with :
7570 name : coverage-test-failures
7671 path : ${{ runner.temp }}/package
72+
73+ upload-coverage :
74+ needs : test-coverage
75+ runs-on :
76+ group : databrickslabs-protected-runner-group
77+ labels : linux-ubuntu-latest
78+ permissions :
79+ contents : read
80+ id-token : write
81+
82+ steps :
83+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
84+
85+ - name : Download coverage artifact
86+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
87+ with :
88+ name : coverage-report
89+ path : coverage
90+
91+ - name : Upload coverage to Codecov
92+ uses : codecov/codecov-action@0561704f0f02c16a585d4c7555e57fa2e44cf909 # v5.5.2
93+ with :
94+ # Fail if error if not on PR, or if on PR and token is given
95+ fail_ci_if_error : ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
96+ files : coverage/cobertura.xml
97+ plugins : noop
98+ disable_search : true
99+ use_oidc : true
0 commit comments