1- # Workflow derived from https://github.com/r-lib/actions/tree/v2 /examples
1+ # Workflow derived from https://github.com/r-lib/actions/tree/master /examples
22# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33on :
44 push :
55 branches : [main, master]
66 pull_request :
7+ branches : [main, master]
78
8- name : test-coverage.yaml
9-
10- permissions : read-all
9+ name : test-coverage
1110
1211jobs :
1312 test-coverage :
@@ -16,47 +15,36 @@ jobs:
1615 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
1716
1817 steps :
19- - uses : actions/checkout@v4
18+ - uses : actions/checkout@v3
2019
2120 - uses : r-lib/actions/setup-r@v2
2221 with :
2322 use-public-rspm : true
2423
2524 - uses : r-lib/actions/setup-r-dependencies@v2
2625 with :
27- extra-packages : any::covr, any::xml2
26+ extra-packages : any::covr
2827 needs : coverage
2928
3029 - name : Test coverage
3130 run : |
32- cov <- covr::package_coverage (
31+ covr::codecov (
3332 quiet = FALSE,
3433 clean = FALSE,
35- install_path = file.path(normalizePath( Sys.getenv("RUNNER_TEMP"), winslash = "/ "), "package")
34+ install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
3635 )
37- print(cov)
38- covr::to_cobertura(cov)
3936 shell : Rscript {0}
4037
41- - uses : codecov/codecov-action@v5
42- with :
43- # Fail if error if not on PR, or if on PR and token is given
44- fail_ci_if_error : ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45- files : ./cobertura.xml
46- plugins : noop
47- disable_search : true
48- token : ${{ secrets.CODECOV_TOKEN }}
49-
5038 - name : Show testthat output
5139 if : always()
5240 run : |
5341 ## --------------------------------------------------------------------
54- find ' ${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
42+ find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
5543 shell : bash
5644
5745 - name : Upload test results
5846 if : failure()
59- uses : actions/upload-artifact@v4
47+ uses : actions/upload-artifact@v3
6048 with :
6149 name : coverage-test-failures
6250 path : ${{ runner.temp }}/package
0 commit comments