From 1380d66ad514d9e6e2ffb662ffddac163066ee0c Mon Sep 17 00:00:00 2001 From: asardaes Date: Sun, 18 Apr 2021 15:03:16 +0200 Subject: [PATCH] Update FORK tests' skip condition --- .github/workflows/check-standard.yaml | 3 ++- tests/testthat/test-06-parallel.R | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 40698b3d..1f860fec 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -78,9 +78,10 @@ jobs: - name: Check env: _R_CHECK_CRAN_INCOMING_REMOTE_: false + _R_CHECK_LIMIT_CORES_: "TRUE" run: | options(crayon.enabled = TRUE) - rcmdcheck::rcmdcheck(build_args = "--compact-vignettes", args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + rcmdcheck::rcmdcheck(build_args = "--compact-vignettes", args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check") shell: Rscript {0} continue-on-error: ${{ matrix.config.r == 'devel' }} diff --git a/tests/testthat/test-06-parallel.R b/tests/testthat/test-06-parallel.R index 3c90515b..beb09f67 100644 --- a/tests/testthat/test-06-parallel.R +++ b/tests/testthat/test-06-parallel.R @@ -7,7 +7,7 @@ context("Parallel tests") chk <- Sys.getenv("_R_CHECK_LIMIT_CORES_", "") if (nzchar(chk) && chk == "TRUE") { - # use 2 cores in CHECK/Travis/AppVeyor + # use 2 cores in CI num_workers <- 2L } else { # use all cores in devtools::test() @@ -50,12 +50,13 @@ test_that("Parallel computation gives the same results as sequential", { test_that("Parallel FORK computation gives the same results as sequential", { skip_on_cran() - skip_on_travis() + skip_on_ci() skip_on_os("windows") skip_if(nzchar(Sys.getenv("R_COVR")), "calculating coverage") - if (getOption("dtwclust_skip_par_tests", FALSE)) + if (getOption("dtwclust_skip_par_tests", FALSE)) { skip("Parallel tests disabled explicitly.") + } # Also test FORK in Linux cat(" - Test FORKs:\n")