Splits the work between devtools::check(args = "--no-tests") (the static / install / vignette parts of R CMD check) and covr::package_coverage(type = "tests") (the test runner, with coverage instrumentation). The unit tests run exactly once, on the coverage side, instead of twice (once for the check, once for the coverage). On a package with a slow suite this halves the wait.

check_n_covr(pkg = ".", args = character(0), quiet = TRUE)

Arguments

pkg

Path to the package.

args

Character vector of extra args passed to devtools::check(). --no-tests is always prepended; pass --as-cran, --no-manual etc. here.

quiet

Logical. Forwarded to both inner runners (devtools::check(quiet = ...) and covr::package_coverage(quiet = ...)). Default TRUE.

Value

A named list with two elements:

Examples

if (FALSE) { # \dontrun{
res <- check_n_covr(".")
res$check
covr::percent_coverage(res$coverage)
} # }