diff --git a/.github/workflows/test-package-vigilant.yaml b/.github/workflows/test-package-vigilant.yaml index 26ab4a32e..79caa5806 100644 --- a/.github/workflows/test-package-vigilant.yaml +++ b/.github/workflows/test-package-vigilant.yaml @@ -22,8 +22,10 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: + extra-packages: | + local::. + any::purrr install-quarto: false - extra-packages: local::. - name: Run Tests run: | @@ -36,5 +38,11 @@ jobs: warnPartialMatchDollar = TRUE ) if (Sys.getenv("_R_CHECK_FORCE_SUGGESTS_", "") == "") Sys.setenv("_R_CHECK_FORCE_SUGGESTS_" = "false") - testthat::test_dir("tests") + pkgload::load_all() + test_script_paths <- testthat::find_test_scripts("tests/testthat") + test_with_warning_as_error <- function(path) { + withr::local_options(list(warn = 2L)) + testthat::test_file(path, stop_on_failure = TRUE, stop_on_warning = TRUE) + } + purrr::walk(test_script_paths, test_with_warning_as_error) shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index 915e03d88..fe2c81522 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -57,6 +57,7 @@ VignetteBuilder: Config/Needs/website: tidyverse/tidytemplate Config/Needs/development: pkgload, testthat, patrick Config/testthat/edition: 3 +Config/testthat/parallel: true Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.3