Skip to content

Commit e619b0d

Browse files
committed
Fixing covr upload in GA
1 parent cbe58a0 commit e619b0d

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/R_CMD_check_Hades.yaml

+20-5
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,31 @@ jobs:
111111
path: check/*.tar.gz
112112

113113
- name: Install covr
114-
if: runner.os == 'macOS'
114+
if: runner.os == 'Linux'
115115
run: |
116-
install.packages("covr")
116+
remotes::install_cran("covr")
117+
remotes::install_cran("xml2")
117118
shell: Rscript {0}
118-
119+
119120
- name: Test coverage
120-
if: runner.os == 'macOS'
121-
run: covr::codecov()
121+
if: runner.os == 'Linux'
122+
run: |
123+
cov <- covr::package_coverage(
124+
quiet = FALSE,
125+
clean = FALSE,
126+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
127+
)
128+
covr::to_cobertura(cov)
122129
shell: Rscript {0}
123130

131+
- uses: codecov/codecov-action@v4
132+
if: runner.os == 'Linux'
133+
with:
134+
file: ./cobertura.xml
135+
plugin: noop
136+
disable_search: true
137+
token: ${{ secrets.CODECOV_TOKEN }}
138+
124139
Release:
125140
needs: R-CMD-Check
126141

0 commit comments

Comments
 (0)