When writing R packages, I prefer to set up CI with usethis::use_github_actions()
, which creates a .github/
directory in the root, where GH action jobs are designed to run: https://stackoverflow.com/a/72268873/8400969.
I have a legacy repo that contains several R packages in a /R
directory, and some other things (e.g., a python application) in other directories, and would like to set up continuous integration for the R packages (each, separately, ideally without moving each to their own repo).
How can I set up the GH actions workflows so they check each R package in the /R
parent directory, separately? Will I be able to use the tools from usethis to create badges, pkgdown websites, etc. with a repo structure like this?
Hard to know what a reproducible example is, but maybe this is a good starting point: a directory with two mature R packages in them, each (currently) with their own .github
subdirectory providing instructions for GH actions.
Commands entered into shell on macOS to create:
mkdir example_repo
cd example_repo
git clone https://github.com/r-lib/scales.git
git clone https://github.com/r-lib/roxygen2
cd roxygen2
rm -rf .git
cd ../scales
rm -rf .git