ci: Local CI

View source: R/ci.R

ciR Documentation

Local CI

Description

Run continuous integration tests locally.

Usage

ci(
  renv = TRUE,
  missing = TRUE,
  pkgdown = TRUE,
  styler = NULL,
  lintr = TRUE,
  document = TRUE,
  normalize = TRUE,
  extra = TRUE,
  urls = TRUE,
  rcmdcheck = TRUE
)

Arguments

renv

check renv::status(dev = TRUE)

missing

run missing_deps()

pkgdown

check pkgdown::check_pkgdown() if ⁠_pkgdown.yml⁠ exists

styler

style all files using style_all(), see details

lintr

lint all files using lint_all()

document

run devtools::document()

normalize

run desc::desc_normalize()

extra

run extra_deps()

urls

validate URLs with url_check() and html_url_check()

rcmdcheck

run ⁠R CMD check⁠ using: rcmdcheck::rcmdcheck(args = "–no-manual", error_on = "warning")

Details

If renv::status(dev = TRUE) is not synchronized, ci() will stop.

If missing_deps() returns any missing dependencies, ci() will stop.

pkgdown::check_pkgdown() will halt ci() with an error if ⁠_pkgdown.yml⁠ is invalid.

If styler is set to NULL (the default), style_all() will be run only if there are no uncommitted changes to git. Setting the value to TRUE or FALSE overrides this check.

If lint_all() finds any lints, ci() will stop and open the RStudio markers pane.

Output from missing, extra, and urls is printed as a tibble for improved readability in the console.

Examples

## Not run: 
ci()
ci(styler = TRUE)
ci(styler = FALSE, rcmdcheck = FALSE)

## End(Not run)

jabenninghoff/rdev documentation built on Sept. 26, 2024, 10:37 p.m.