bump dev version #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: test-coverage | |
jobs: | |
test-coverage: | |
# shell needs to use login mode so conda env activation can work | |
defaults: | |
run: | |
shell: bash -l {0} | |
runs-on: ubuntu-20.04 | |
env: | |
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: my-env | |
- name: Update PATH env variable to include conda bin dir (Linux and MacOS) | |
run: echo "PATH=$PATH" >> $GITHUB_ENV | |
if: runner.os != 'Windows' | |
- name: Install osmium | |
run: conda install -c conda-forge osmium-tool | |
- uses: r-lib/actions/setup-r@v2 | |
id: install-r | |
- name: Install pak and query dependencies | |
run: | | |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") | |
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") | |
shell: Rscript {0} | |
- name: Restore R package cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ env.R_LIBS_USER }}/* | |
!${{ env.R_LIBS_USER }}/pak | |
key: ubuntu-20.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} | |
restore-keys: ubuntu-20.04-${{ steps.install-r.outputs.installed-r-version }}-1- | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
run: | | |
pak::local_system_requirements(execute = TRUE) | |
pak::pkg_system_requirements("covr", execute = TRUE) | |
shell: Rscript {0} | |
- name: Install dependencies | |
run: | | |
pak::local_install_dev_deps(upgrade = TRUE) | |
pak::pkg_install("covr") | |
shell: Rscript {0} | |
- name: Test coverage | |
run: covr::codecov(quiet = FALSE) | |
shell: Rscript {0} |