Create workflow that calls an rworkflows GitHub Actions (GHA)
use_workflow(
template = "rworkflows",
name = template,
tag = "@master",
on = c("push", "pull_request"),
branches = c("master", "main", "devel", "RELEASE_**"),
runners = construct_runners(),
github_token = "${{ secrets.GITHUB_TOKEN }}",
cache_version = "cache-v1",
enable_act = FALSE,
run_bioccheck = FALSE,
run_rcmdcheck = TRUE,
as_cran = TRUE,
run_vignettes = TRUE,
has_testthat = TRUE,
has_runit = FALSE,
run_covr = TRUE,
has_latex = FALSE,
tinytex_installer = "TinyTeX-1",
tinytex_version = NULL,
pandoc_version = "2.19",
run_pkgdown = TRUE,
run_docker = FALSE,
docker_registry = "ghcr.io",
docker_user = NULL,
docker_org = docker_user,
docker_token = "${{ secrets.DOCKER_TOKEN }}",
miniforge_variant = FALSE,
miniforge_version = NULL,
activate_environment = "test",
environment_file = NULL,
channels = NULL,
save_dir = here::here(".github", "workflows"),
return_path = TRUE,
force_new = FALSE,
preview = FALSE,
verbose = TRUE
)
Workflow template name.
A short workflow script that calls the GitHub action from the GitHub Marketplace. The action is continually updated so users do not need to worry about maintaining it.
A longer workflow scripts that explicitly copies all steps from the rworkflows action into a static file. Users may need to update this file themselves over time, though this does allow for a fully customisable workflow.
An arbitrary name to call the workflow.
Which version of the rworkflows
action to use.
Can be a branch name on the
GitHub repository (e.g. "\@master"),
or a Release Tag
(e.g. "\@v1").
GitHub trigger conditions.
GitHub trigger branches.
Runner configurations for multiple Operating Systems (OS), including R versions, Bioc versions, and container sources. Can use the construct_runners functions to assist in constructing customized runners configurations.
GitHub authentication token with permissions to push to the R package's GitHub repository. Also used to bypass GitHub download limits. By default, uses {{ secrets.GITHUB_TOKEN }} which is automatically set up by GitHub. However users can also choose to pass a custom GitHub secret variable (e.g. {{ secrets.PAT_GITHUB }}) which allows access to private repositories. Read here for more details.
Name of the cache sudirectory to be used when reinstalling software in GHA.
Whether to add extra lines to the yaml to enable local workflow checking with act.
Run Bioconductor checks using
BiocCheck::BiocCheck()
.
Must pass in order to continue workflow.
Run R CMD checks using
rcmdcheck::rcmdcheck()
.
Must pass in order to continue workflow.
When running R CMD checks, use the '–as-cran' flag to apply CRAN standards
Build and check R package vignettes.
Run unit tests and report results.
Run R Unit tests.
Run code coverage tests and publish results to codecov.
Install a suite of LaTeX dependencies used for rendering Sweave (.rnw) and other documentation files.
Which release of tinytex (bundles of LaTeX
packages) to use. All options can be found
here.
Note, 'TinyTeX-2' is only available for tinytex_version='daily'
.
Which version of tinytex to use. When set to ”, uses the latest daily build. All versions can be found here.
Which version of pandoc to use. For details see here.
Knit the README.Rmd (if available), build documentation website, and deploy to gh-pages branch.
Whether to build and push a Docker container to DockerHub.
Docker container registry to push to. Options include:
Docker registry username.
Not used when docker_registry="ghcr.io"
.
Docker registry organization name.
Is the same as docker_user
by default.
Not used when docker_registry="ghcr.io"
.
Docker registry token.
Not used when docker_registry="ghcr.io"
.
If provided, this variant of Miniforge will be
downloaded and installed. If miniforge_variant=false
,
Miniforge will not be installed at all.
If miniforge_variant=""
, the "Miniforge3" variant will be installed.
If miniforge_version
is not provided, the latest
version will be used.
Currently-known values: - "Miniforge3" (default) - "Miniforge-pypy3" -
"Mambaforge" - "Mambaforge-pypy3".
Visit
https://github.com/conda-forge/miniforge/releases/ for more information on
available variants.
If provided, this version of the given Miniforge
variant will be downloaded and installed. If miniforge_variant
is
not provided, "Miniforge3" will be used. Visit
https://github.com/conda-forge/miniforge/releases/ for more information on
available versions.
Environment name (or path) to activate on all
shells. Default is "test" which will be created in $CONDA/envs/test.
If an empty string is used, no environment is activated by default
(For "base" activation see the auto-activate-base
option).
If the environment does not exist, it will
be created and activated. If environment-file
is used and you want
that to be the environment used, you need to explicitly provide the name of
that environment on activate-environment
.
If using sh/bash/cmd.exe
shells please read the IMPORTANT! section on the README.md! to properly
activate conda environments on these shells.
Path or URL to a .yml file to build the conda environment with. For more information see here.
Conda configuration. Comma separated list of channels to use in order of priority. See here for more information.
Directory to save workflow to.
Return the path to the saved yaml workflow file
(default: TRUE
), or return the yaml object directly.
If the GHA workflow yaml already exists,
overwrite with new one (default: FALSE
).
Print the yaml file to the R console.
Print messages.
Path or yaml object.