File tree 1 file changed +17
-6
lines changed
1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
name : test-coverage
10
10
11
+ permissions : read-all
12
+
11
13
jobs :
12
14
test-coverage :
13
15
runs-on : ubuntu-latest
14
16
env :
15
17
GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
16
18
17
19
steps :
18
- - uses : actions/checkout@v3
20
+ - uses : actions/checkout@v4
19
21
20
22
- uses : r-lib/actions/setup-r@v2
21
23
with :
22
24
use-public-rspm : true
23
25
24
26
- uses : r-lib/actions/setup-r-dependencies@v2
25
27
with :
26
- extra-packages : any::covr
28
+ extra-packages : any::covr, any::xml2
27
29
needs : coverage
28
30
29
31
- name : Test coverage
30
32
run : |
31
- covr::codecov (
33
+ cov <- covr::package_coverage (
32
34
quiet = FALSE,
33
35
clean = FALSE,
34
- install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36
+ install_path = file.path(normalizePath( Sys.getenv("RUNNER_TEMP"), winslash = "/ "), "package")
35
37
)
38
+ covr::to_cobertura(cov)
36
39
shell : Rscript {0}
37
40
41
+ - uses : codecov/codecov-action@v4
42
+ with :
43
+ fail_ci_if_error : ${{ github.event_name != 'pull_request' && true || false }}
44
+ file : ./cobertura.xml
45
+ plugin : noop
46
+ disable_search : true
47
+ token : ${{ secrets.CODECOV_TOKEN }}
48
+
38
49
- name : Show testthat output
39
50
if : always()
40
51
run : |
41
52
## --------------------------------------------------------------------
42
- find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53
+ find ' ${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
43
54
shell : bash
44
55
45
56
- name : Upload test results
46
57
if : failure()
47
- uses : actions/upload-artifact@v3
58
+ uses : actions/upload-artifact@v4
48
59
with :
49
60
name : coverage-test-failures
50
61
path : ${{ runner.temp }}/package
You can’t perform that action at this time.
0 commit comments