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)Path to the package.
Character vector of extra args passed to
devtools::check(). --no-tests is always prepended; pass
--as-cran, --no-manual etc. here.
Logical. Forwarded to both inner runners
(devtools::check(quiet = ...) and
covr::package_coverage(quiet = ...)). Default TRUE.
A named list with two elements:
check: the rcmdcheck result returned by
devtools::check().
coverage: the package_coverage object returned by
covr::package_coverage().
if (FALSE) { # \dontrun{
res <- check_n_covr(".")
res$check
covr::percent_coverage(res$coverage)
} # }