File tree 1 file changed +19
-7
lines changed
1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 2
2
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3
3
on :
4
4
push :
5
- branches : main
5
+ branches : [ main, master]
6
6
pull_request :
7
- branches : main
8
- workflow_dispatch :
9
7
10
- name : test-coverage
8
+ name : test-coverage.yaml
9
+
10
+ permissions : read-all
11
11
12
12
jobs :
13
13
test-coverage :
14
14
runs-on : ubuntu-latest
15
+ env :
16
+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
15
17
16
18
steps :
17
19
- uses : actions/checkout@v4
@@ -22,23 +24,33 @@ jobs:
22
24
23
25
- uses : r-lib/actions/setup-r-dependencies@v2
24
26
with :
25
- extra-packages : any::covr
27
+ extra-packages : any::covr, any::xml2
26
28
needs : coverage
27
29
28
30
- name : Test coverage
29
31
run : |
30
- covr::codecov (
32
+ cov <- covr::package_coverage (
31
33
quiet = FALSE,
32
34
clean = FALSE,
33
35
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
34
36
)
37
+ covr::to_cobertura(cov)
35
38
shell : Rscript {0}
36
39
40
+ - uses : codecov/codecov-action@v4
41
+ with :
42
+ # Fail if error if not on PR, or if on PR and token is given
43
+ fail_ci_if_error : ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44
+ file : ./cobertura.xml
45
+ plugin : noop
46
+ disable_search : true
47
+ token : ${{ secrets.CODECOV_TOKEN }}
48
+
37
49
- name : Show testthat output
38
50
if : always()
39
51
run : |
40
52
## --------------------------------------------------------------------
41
- find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53
+ find ' ${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
42
54
shell : bash
43
55
44
56
- name : Upload test results
You can’t perform that action at this time.
0 commit comments