R/use_bioc_github_action.R
use_bioc_github_action.RdThis function is very similar to usethis::use_github_action() except
that it uses a template from biocthis. It creates a Bioconductor-friendly
GitHub action workflow for your package. You can also use this GitHub
Actions workflow by executing usethis::use_github_action().
use_bioc_github_action(
biocdocker = "release",
pkgdown = getOption("biocthis.pkgdown", FALSE),
testthat = getOption("biocthis.testthat", FALSE),
covr = testthat,
covr_coverage_type = getOption("biocthis.covr_coverage_type", "all"),
RUnit = getOption("biocthis.RUnit", FALSE),
pkgdown_covr_branch = getOption("biocthis.pkgdown_covr_branch", "devel"),
docker = getOption("biocthis.docker", FALSE)
)A character(1) specifying the Bioconductor docker
version you want to use. Valid names are "release", "devel" or in the
"RELEASE_X_Y" format such as "RELEASE_3_11". "release" is a special case
where the latest bioc-release version will be automatically detected. Check
http://bioconductor.org/help/docker/ for more information on the
Bioconductor docker images.
A logical(1) specifying whether to run pkgdown. Check
https://cran.r-project.org/web/packages/pkgdown/index.html for more
information on pkgdown which is useful for creating documentation
websites. If TRUE, then pkgdown will only run on the Linux
(Bioconductor docker) test.
A logical(1) specifying whether to run testthat. Check
https://cran.r-project.org/web/packages/testthat/index.html for more
information about testthat which is useful for unit tests. The
testing chapter at https://r-pkgs.org/tests.html is also very useful.
A logical(1) specifying whether to run covr. Check
https://cran.r-project.org/web/packages/covr/index.html for more
information about covr, which is useful for displaying for assessing
your test coverage. If TRUE, then covr will only run on the Linux
(Bioconductor docker) test.
A character(1) specifying the code used to
calculate the covr coverage. Option are package "tests", "vignettes",
"examples", "all", or "none". The default is "all".
A logical(1) specifying whether to run RUnit unit tests.
Check http://bioconductor.org/developers/how-to/unitTesting-guidelines/
for more information about RUnit.
A character(1) specifying the name of the GitHub
branch that will be used creating the pkgdown website and running covr.
Since biocthis version 1.9.3 this changed from "master" to "devel" by default
to match https://twitter.com/Bioconductor/status/1631234299423850497.
A logical(1) specifying whether to build a docker image
with the resulting package. This will also create a Dockerfile. You can
alternatively try using this excellent template:
https://github.com/seandavi/BuildABiocWorkshop.
This function adds and/or replaces the
.github/workflows/check-bioc.yml file in your R package.
For the full history on how this GitHub Actions workflow came to be, check the "biocthis developer notes" vignette https://lcolladotor.github.io/biocthis/articles/biocthis_dev_notes.html.
if (FALSE) { # \dontrun{
## Run this function in your package
biocthis::use_bioc_github_action()
} # }
## I have the following options on my ~/.Rprofile set
## Check
## <https://github.com/lcolladotor/biocthis/issues/9#issuecomment-702401032>
## for more information.
options("biocthis.pkgdown" = TRUE)
options("biocthis.testthat" = TRUE)