Open maurolepore opened 2 years ago
TESTTHAT
is_testing <- function() { identical(Sys.getenv("TESTTHAT"), "true") }
R_CMD
skip_if_R_CMD_check <- function() { if (!nzchar(Sys.getenv("R_CMD"))) { return(invisible(TRUE)) } skip("Not run in R CMD check") }
Worth noting that the default GH Action for running R CMD CHECK (r-libs) uses rcmdcheck::rcmdcheck, which appears to still trigger the is_testing function stubbed above.
r-lib
rcmdcheck::rcmdcheck
is_testing
TESTTHAT
, example:R_CMD
, example: