diff --git a/.github/workflows/check-test-warnings.yaml b/.github/workflows/check-test-warnings.yaml index 4f10ed7..683b977 100644 --- a/.github/workflows/check-test-warnings.yaml +++ b/.github/workflows/check-test-warnings.yaml @@ -37,7 +37,11 @@ jobs: - name: Run Tests run: | - options(crayon.enabled = TRUE, warn = 2L) - # testthat::test_dir("tests") - devtools::test() + pkgload::load_all() + test_script_paths <- testthat::find_test_scripts("tests/testthat") + test_with_warning_as_error <- function(...) { + withr::local_options(list(warn = 2L)) + testthat::test_file(...) + } + purrr::walk(test_script_paths, test_with_warning_as_error) shell: Rscript {0}