Skip to content

Commit b483e67

Browse files
committed
up CI
1 parent 3433188 commit b483e67

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# https://github.com/r-lib/actions/blob/v2-branch/examples/check-standard.yaml
2-
# usethis::use_github_action("check-standard") will install it.
3-
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
43
on:
54
push:
65
branches: [main, master]
@@ -19,15 +18,14 @@ jobs:
1918
fail-fast: false
2019
matrix:
2120
config:
22-
- {os: macos-latest, r: 'release'}
21+
# - {os: macos-latest, r: 'release'}
2322
- {os: windows-latest, r: 'release'}
2423
# - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
2524
- {os: ubuntu-latest, r: 'release'}
2625
# - {os: ubuntu-latest, r: 'oldrel-1'}
2726

2827
env:
2928
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3129
R_KEEP_PKG_SOURCE: yes
3230

3331
steps:
@@ -48,5 +46,5 @@ jobs:
4846

4947
- uses: r-lib/actions/check-r-package@v2
5048
with:
51-
upload-snapshots: true
49+
upload-snapshots: false
5250
error-on: '"error"'

.github/workflows/test-coverage.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,54 @@ on:
88

99
name: test-coverage
1010

11+
permissions: read-all
12+
1113
jobs:
1214
test-coverage:
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618

1719
steps:
18-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
1921

2022
- uses: r-lib/actions/setup-r@v2
2123
with:
2224
use-public-rspm: true
2325

2426
- uses: r-lib/actions/setup-r-dependencies@v2
2527
with:
26-
extra-packages: any::covr
28+
extra-packages: any::covr, any::xml2
2729
needs: coverage
2830

2931
- name: Test coverage
3032
run: |
31-
covr::codecov(
33+
cov <- covr::package_coverage(
3234
quiet = FALSE,
3335
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3537
)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

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+
3849
- name: Show testthat output
3950
if: always()
4051
run: |
4152
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4354
shell: bash
4455

4556
- name: Upload test results
4657
if: failure()
47-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4859
with:
4960
name: coverage-test-failures
5061
path: ${{ runner.temp }}/package

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ data-raw
1919
libs
2020
*.vdoc.r
2121
*.csv
22+
23+
Project_stats

0 commit comments

Comments
 (0)