tic (version 0.4.0)

do_package_checks: Add default checks for packages

Description

do_package_checks() adds default steps related to package checks to the "before_install", "install", "script" and "after_success" stages:

  1. step_install_deps() in the "install" stage, using the repos argument.

  2. step_rcmdcheck() in the "script" stage, using the warnings_are_errors, notes_are_errors, args, and build_args arguments.

  3. A call to covr::codecov() in the "after_success" stage (only if the codecov flag is set)

Usage

do_package_checks(
  ...,
  codecov = !ci_is_interactive(),
  warnings_are_errors = NULL,
  notes_are_errors = NULL,
  args = NULL,
  build_args = NULL,
  error_on = "warning",
  repos = repo_default(),
  timeout = Inf,
  type = NULL,
  check_dir = NULL
)

Arguments

...

Ignored, used to enforce naming of arguments.

codecov

[flag] Whether to include a step running covr::codecov(quiet = FALSE) (default: only for non-interactive CI, see ci_is_interactive()).

warnings_are_errors

[flag] Deprecated, use error_on.

notes_are_errors

[flag] Deprecated, use error_on.

args

[character] Passed to rcmdcheck::rcmdcheck(). Default for Travis and local runs: c("--no-manual", "--as-cran"). Default for Appveyor: c("--no-manual", "--as-cran", "--no-vignettes", "--no-build-vignettes", "--no-multiarch").

build_args

[character] Passed to rcmdcheck::rcmdcheck(). Default for Travis and local runs: "--force". Default for Appveyor: c("--no-build-vignettes", "--force").

error_on

[character] Whether to throw an error on R CMD check failures. Note that the check is always completed (unless a timeout happens), and the error is only thrown after completion. If "never", then no errors are thrown. If "error", then only ERROR failures generate errors. If "warning", then WARNING failures generate errors as well. If "note", then any check failure generated an error.

repos

[character] Passed to rcmdcheck::rcmdcheck(), default: repo_default().

timeout

[numeric] Passed to rcmdcheck::rcmdcheck(), default: Inf.

type

Passed on to install.packages(). The default avoids installation from source on Windows and macOS by passing .Platform$pkgType.

check_dir

[character] Path specifying the directory for R CMD check. Defaults to project root for easy upload of artifacts.

See Also

Other macros: do_bookdown(), do_drat(), do_pkgdown()

Examples

Run this code
# NOT RUN {
dsl_init()

do_package_checks()

dsl_get()
# }

Run the code above in your browser using DataLab