github_actions {usethis} | R Documentation |
Sets up continuous integration (CI) for an R package that is developed on GitHub using GitHub Actions. CI can be used to trigger various operations for each push or pull request, such as:
Run R CMD check
on various operating systems and R versions
Build and deploy a pkgdown site
Determine test coverage
This family of functions
Adds the necessary configuration files and lists them in .Rbuildignore
Provides the markdown to insert a badge into your README
use_github_actions()
use_github_actions_badge(name = "R-CMD-check.yaml", repo_spec = NULL)
use_github_action(
name,
ref = NULL,
url = NULL,
save_as = NULL,
readme = NULL,
ignore = TRUE,
open = FALSE
)
use_github_action_check_release(
save_as = "R-CMD-check.yaml",
ref = NULL,
ignore = TRUE,
open = FALSE
)
use_github_action_check_standard(
save_as = "R-CMD-check.yaml",
ref = NULL,
ignore = TRUE,
open = FALSE
)
use_github_action_pr_commands(
save_as = "pr-commands.yaml",
ref = NULL,
ignore = TRUE,
open = FALSE
)
name |
For For If |
repo_spec |
Optional GitHub repo specification in this form: |
ref |
Desired Git reference, usually the name of a tag ( |
url |
The full URL to a |
save_as |
Name of the local workflow file. Defaults to |
readme |
The full URL to a |
ignore |
Should the newly created file be added to |
open |
Open the newly created file for editing? Happens in RStudio, if
applicable, or via |
use_github_actions()
Configures a basic R CMD check
workflow on GitHub Actions by adding a
standard R-CMD-check.yaml
file to the .github/workflows
directory of the
active project. This is actually just an alias for
use_github_action_check_release()
.
use_github_actions_badge()
Generates a GitHub Actions badge and that's all. It does not configure a workflow. This exists mostly for internal use in the other functions documented here.
use_github_action()
Configures an individual, specific GitHub Actions workflow, either one of the
examples from
r-lib/actions/examples
or a custom workflow given by the url
parameter.
Used internally to power all the other GitHub Actions functions, but it can also be called directly by the user.
use_github_action_check_release()
This entry-level, bare-minimum workflow installs the latest release of R (on
a current distribution of Linux) and runs R CMD check
via the
rcmdcheck package.
use_github_action_check_standard()
This workflow runs R CMD check
via the
rcmdcheck package on the three major
operating systems (Linux, macOS, and Windows) on the latest release of R and
on R-devel. This workflow is appropriate for a package that is (or aspires to
be) on CRAN or Bioconductor.
use_github_action_pr_commands()
This workflow enables the use of two R-specific commands in pull request issue comments:
/document
to run roxygen2::roxygenise()
and update the PR
/style
to run styler::style_pkg()
and update the PR
use_github_file()
for more about url
format and parsing.
use_tidy_github_actions()
for the standard GitHub Actions used for
tidyverse packages.
## Not run:
use_github_actions()
use_github_action_check_standard()
use_github_action("pkgdown")
## End(Not run)