1

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
Michael Roswell
  • 1,300
  • 12
  • 31
  • This looks potentially helpful: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore Even if `working-directory` won't get me there, maybe `paths` will? – Michael Roswell Nov 17 '22 at 15:37
  • If I understand correctly, `paths` is more about what triggers the action than where it takes place. – Michael Roswell Nov 18 '22 at 16:44

0 Answers0