Skip to content

Run R tests

Run R tests #22

Workflow file for this run

name: r_tests
run-name: Run R tests
on:
push:
branches: [main]
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
env:
RENV_CONFIG_PAK_ENABLED: true
steps:
- uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: 4.4.1
- name: Restore renv from root
run: |
Rscript -e 'renv::restore(project = ".")'
- name: Run testthat tests
run: |
Rscript -e 'renv::activate(); devtools::load_all("examples/r_package"); testthat::test_dir("examples/r_package/tests/testthat")'