Skip to content

Commit 3b100fc

Browse files
committed
Run on ubuntu
1 parent 319d394 commit 3b100fc

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/test-coverage.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions: read-all
1111

1212
jobs:
1313
test-coverage:
14-
runs-on: windows-latest
14+
runs-on: ubuntu-latest
1515
env:
1616
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1717
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -33,19 +33,19 @@ jobs:
3333

3434
- name: Test coverage
3535
run: |
36-
# Need to config junit on a tempdir() to locate it
36+
# Need to config junit on working dir to locate it
3737
wdir <- file.path(normalizePath(getwd(), winslash = "/"))
38-
junfile <- file.path(
39-
normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"),
40-
"junit.xml"
41-
)
38+
junfile <- file.path(wdir, "junit.xml")
39+
4240
# And get the name
4341
pkgname <- as.character(unname(read.dcf("DESCRIPTION", "Package")))
42+
4443
# Create junit code as character
4544
junreport <- paste0(
4645
"testthat::test_package('",
4746
pkgname, "', reporter = testthat::JunitReporter$new(file = '", junfile, "'))"
4847
)
48+
4949
cov <- covr::package_coverage(
5050
quiet = FALSE,
5151
clean = FALSE,
@@ -55,13 +55,12 @@ jobs:
5555
), "package"),
5656
code = junreport
5757
)
58+
5859
# Show results
5960
print(cov)
61+
6062
# Generate files for upload in the working dir
6163
covr::to_cobertura(cov)
62-
file.copy(junfile, wdir, overwrite = TRUE)
63-
# And clean
64-
unlink(junfile, force = TRUE)
6564
shell: Rscript {0}
6665

6766
- name: Upload coverage report
@@ -96,3 +95,4 @@ jobs:
9695
with:
9796
name: coverage-test-failures
9897
path: ${{ runner.temp }}/package
98+

climaemet.Rproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 646afa3d-a1ab-4e00-b95e-c29f97003055
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

0 commit comments

Comments
 (0)