Skip to content

Fix GitHub Actions Ubuntu testing error #17

Fix GitHub Actions Ubuntu testing error

Fix GitHub Actions Ubuntu testing error #17

name: test-coverage
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
- name: Cache R packages
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- name: Test coverage
run: covr::codecov()
shell: Rscript {0}