Skip to content

add testthat to renv #7

add testthat to renv

add testthat to renv #7

name: check assignment
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
check-assignment:
runs-on: ubuntu-latest
container: rocker/tidyverse:4.4.2
steps:
- uses: actions/checkout@v4
- name: Check that R file/s exist/s
run: |
testthat::test_that("R file exists",
testthat::expect_true(
length(list.files(pattern = "\\.R$|\\.r$")) > 0
)
)
shell: Rscript {0}
- name: Check that R file runs without errors
run: |
lapply(
X = list.files(pattern = "\\.R$|\\.r$"),
FUN = source
)
shell: Rscript {0}