Skip to content

Commit 11a44bd

Browse files
Restore covr (#6540)
* Revert "Disable covr (#6122)" This reverts commit 3130f11. * pin R 4.3 with TODO * Try a pinned covr version * go further back * Use cribbed updated covr action? * Not crashing, but very slow; try pinned version again * we don't have secrets set up * Added a repo secret to data.table (I think)
1 parent 623bee9 commit 11a44bd

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/test-coverage.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: r-lib/actions/setup-r@v2
23+
with:
24+
use-public-rspm: true
25+
r-version: '4.3' # TODO(r-lib/covr#567): Go back to using r-devel
26+
27+
- uses: r-lib/actions/setup-r-dependencies@v2
28+
with:
29+
extra-packages: any::covr, any::xml2
30+
needs: coverage
31+
32+
- name: Test coverage
33+
run: |
34+
cov <- covr::package_coverage(
35+
quiet = FALSE,
36+
clean = FALSE,
37+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
38+
)
39+
covr::to_cobertura(cov)
40+
shell: Rscript {0}
41+
42+
- uses: codecov/codecov-action@v4
43+
with:
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
45+
file: ./cobertura.xml
46+
plugin: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
50+
- name: Upload test results
51+
if: failure()
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: coverage-test-failures
55+
path: ${{ runner.temp }}/package

0 commit comments

Comments
 (0)