Man Pages Workflow
This GitHub Actions workflow is designed for generating and checking man pages in an R package using Roxygen. It uses a matrix strategy to test different versions of R.
Workflow Triggers
This workflow is triggered in two ways:
Manual Dispatch: You can manually trigger the workflow using the “workflow_dispatch” event. When triggered manually, you can specify the R version.
Workflow Call: The workflow can also be triggered by another workflow using the “workflow_call” event. The R version is an input for this event.
Workflow Setup
- Name: Man Pages
- Concurrency: Man page jobs are organized by the pull request number or branch.
- Cancel-in-progress: Allows canceling in-progress man page jobs.
Job: lint
This job runs Roxygen to generate and check man pages in the R
package. It runs on a docker container instance using
admiralci
images
(ghcr.io/pharmaverse/admiralci-${{ inputs.r-version }}:latest
)
for the R environment.
Steps
Boilerplate Steps
Get branch names: Retrieves branch names for further processing.
Checkout repo (PR): Checks out the repository for pull requests.
Checkout repository: Checks out the repository for non-pull request events.
Normalize inputs: Normalizes input values, including determining the R version.
Restore cache: Restores the cache for staged dependencies.
Run Staged dependencies: Runs the staged dependencies action.
Install dependencies from DESCRIPTION: install dependencies from DESCRIPTION (in case of missing dependencies in parent admiralci docker image)
Roxygen Workflow
-
Generate man pages: Runs
roxygen2::roxygenize()
to generate man pages. - Set-up safe dir: Sets up a safe directory for git configuration.
-
Roxygen check: Checks if manuals are up-to-date
with Roxygen comments and provides guidance if differences are found. If
differences are found, the workflow will fail, giving the cmd to run to
the admiral devs :
roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace'))