Workshop exercise 3_Actions_Package: the bionmf package from 2_Simple_Package, extended with GitHub Actions for collaboration and CI.
bionmf
Four workflows live in .github/workflows/:
| Workflow | Trigger | Purpose |
|---|---|---|
issue-message.yml |
Issue opened | Posts a welcome message and bug-report checklist |
pull-request-message.yml |
PR opened / reopened | Posts a contributor checklist on the PR |
install-package.yml |
Push / PR to main
|
Builds and installs the package on Ubuntu |
run-tests.yml |
Push / PR to main
|
Runs testthat via r-lib/actions
|
Together they cover communication (issues & PRs) and continuous integration (install + test).
Same as step 2 — see the mapping in 2_Simple_Package/README.md. All R code, tests, and bundled data are unchanged unless you modify them during the Actions exercise.
When bionmf is the root of your GitHub repository, copy .github/workflows/ to the repository root. GitHub only runs workflows from <repo>/.github/workflows/.
This repository also includes mirrored workflows at the repository root:
.github/workflows/bionmf-issue-message.yml.github/workflows/bionmf-pull-request-message.yml.github/workflows/bionmf-install-package.yml.github/workflows/bionmf-run-tests.ymlThe install, test, and PR-message workflows set working-directory: Exercises/3_Actions_Package where needed and use paths filters so they run only when this exercise changes. The issue-message workflow cannot use paths (GitHub does not support that filter on issues events); it posts only when the issue title or body mentions bionmf or 3_Actions_Package.
bionmf or 3_Actions_Package — the issue workflow posts a template comment.Exercises/3_Actions_Package/ — the PR workflow posts a checklist comment.Exercises/3_Actions_Package/ — install and test workflows run on GitHub’s Ubuntu runners.Check the Actions tab on GitHub for workflow run logs.
issues: write or pull-requests: write.setup-r, setup-r-dependencies, test-package).1_Simple_Scripts — script-based prototype2_Simple_Package — package structure, roxygen2, testthat