@@ -16,26 +16,35 @@ jobs:
16
16
17
17
steps :
18
18
- uses : actions/checkout@v3
19
- - uses : r-lib/actions/setup-r@v2-branch
19
+
20
+ - uses : r-lib/actions/setup-r@v2
20
21
with :
21
22
use-public-rspm : true
22
23
23
- - uses : r-lib/actions/setup-r-dependencies@v2-branch
24
+ - uses : r-lib/actions/setup-r-dependencies@v2
24
25
with :
25
26
extra-packages : any::covr
26
27
needs : coverage
27
28
28
29
- name : Test coverage
29
30
run : |
30
- test1 <- covr::package_coverage()
31
- system("mv tests/testthat tests/done")
32
- system("mv tests/local tests/testthat")
33
- test2 <- covr::package_coverage()
34
- system("mv tests/testthat tests/local")
35
- system("mv tests/done tests/testthat")
36
- combined_cov <- c(test1, test2)
37
- attr(combined_cov, "class") <- attr(test1, "class")
38
- attr(combined_cov, "package") <- attr(test1, "package")
39
- attr(combined_cov, "relative") <- attr(test1, "relative")
40
- covr::codecov(coverage = combined_cov, quiet = FALSE)
31
+ covr::codecov(
32
+ quiet = FALSE,
33
+ clean = FALSE,
34
+ install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
35
+ )
41
36
shell : Rscript {0}
37
+
38
+ - name : Show testthat output
39
+ if : always()
40
+ run : |
41
+ ## --------------------------------------------------------------------
42
+ find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
43
+ shell : bash
44
+
45
+ - name : Upload test results
46
+ if : failure()
47
+ uses : actions/upload-artifact@v3
48
+ with :
49
+ name : coverage-test-failures
50
+ path : ${{ runner.temp }}/package
0 commit comments