Check Templates Workflow
This GitHub Actions workflow is designed to check templates in an R package. It utilizes 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 to use.
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: Check Templates
- Concurrency: Templates are checked concurrently based on the branch or pull request number.
Job: check_templates
This job verifies templates 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
These steps perform initial setup, such as checking out the repository, normalizing inputs, and restoring the cache.
- 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.
- Add safe directory: Adds a safe directory to the configuration.
- Normalize inputs: Normalizes input values, including determining the R version and branch.
Staged Dependencies
These steps handle staged dependencies, including cache restoration and running the staged dependencies action.
- 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)