From 40e2d740d0799a4741c40be27905d2dc2b5938e4 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Mon, 20 May 2024 09:44:24 -0700 Subject: [PATCH] skip vignettes when engine unavailable (#6145) * skip vignettes when engine unavailable * set to run again tomorrow * turn off quiet=TRUE to see if that gives any hint of what's going wrong --- .github/workflows/R-CMD-check-occasional.yaml | 9 ++++++--- inst/tests/other.Rraw | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/R-CMD-check-occasional.yaml b/.github/workflows/R-CMD-check-occasional.yaml index 86317ad43..3c5d5812c 100644 --- a/.github/workflows/R-CMD-check-occasional.yaml +++ b/.github/workflows/R-CMD-check-occasional.yaml @@ -1,6 +1,6 @@ on: schedule: - - cron: '17 13 19 * *' # 18th of month at 13:17 UTC + - cron: '17 13 21 * *' # 18th of month at 13:17 UTC # A more complete suite of checks to run monthly; each PR/merge need not pass all these, but they should pass before CRAN release name: R-CMD-check-occasional @@ -135,12 +135,15 @@ jobs: Sys.unsetenv("TEST_DATA_TABLE_WITH_OTHER_PACKAGES") } - args <- c("--no-manual", "--as-cran") + do_vignettes <- requireNamespace("knitr", quietly=TRUE) + + vignette_args <- if (!do_vignettes) "--no-build-vignettes" + args <- c("--no-manual", "--as-cran", vignette_args) if (requireNamespace("rcmdcheck", quietly=TRUE)) { rcmdcheck::rcmdcheck(args = args, error_on = "warning", check_dir = "check") } else { Rbin = if (.Platform$OS.type == "windows") "R.exe" else "R" - system2(Rbin, c("CMD", "build", ".")) + system2(Rbin, c("CMD", "build", ".", vignette_args)) dt_tar <- list.files(pattern = "^data[.]table_.*[.]tar[.]gz$") if (!length(dt_tar)) stop("Built tar.gz not found among: ", toString(list.files())) res = system2(Rbin, c("CMD", "check", dt_tar[1L], args), stdout=TRUE) diff --git a/inst/tests/other.Rraw b/inst/tests/other.Rraw index 80066b304..5c42dfdff 100644 --- a/inst/tests/other.Rraw +++ b/inst/tests/other.Rraw @@ -23,7 +23,7 @@ INT = data.table:::INT if (anyDuplicated(pkgs)) stop("Packages defined to be loaded for integration tests in 'inst/tests/other.Rraw' contains duplicates.") f = function(pkg) suppressWarnings(suppressMessages(isTRUE( - library(pkg, character.only=TRUE, logical.return=TRUE, quietly=TRUE, warn.conflicts=FALSE, pos="package:base") # attach at the end for #5101 + library(pkg, character.only=TRUE, logical.return=TRUE, warn.conflicts=FALSE, pos="package:base") # attach at the end for #5101 ))) loaded = sapply(pkgs, f) if (!all(loaded)) {