Skip to content

Merge pull request #73 from unicef-drp/develop #167

Merge pull request #73 from unicef-drp/develop

Merge pull request #73 from unicef-drp/develop #167

Workflow file for this run

# R-CMD-check Workflow
# Standard R package checks across multiple platforms and R versions
#
# Derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# Fix (2026-02-02): Changed ubuntu-latest to ubuntu-22.04 to avoid
# pandoc-citeproc unavailability issue on Ubuntu 24.04
# See: https://github.com/r-lib/actions/issues/994
name: R-CMD-check
on:
push:
branches: [main, develop]
paths:
- 'r/**'
- 'R/**'
- 'tests/**'
- 'scripts/enforce_r_dir_policy.py'
- 'scripts/prepare_r_test_fixtures.py'
- '.githooks/pre-commit'
- '.github/workflow-config.yml'
- '.github/scripts/load_workflow_config.py'
- '.github/workflows/_reusable-r-check.yml'
- '.github/workflows/check.yaml'
pull_request:
branches: [main, develop]
paths:
- 'r/**'
- 'R/**'
- 'tests/**'
- 'scripts/enforce_r_dir_policy.py'
- 'scripts/prepare_r_test_fixtures.py'
- '.githooks/pre-commit'
- '.github/workflow-config.yml'
- '.github/scripts/load_workflow_config.py'
- '.github/workflows/_reusable-r-check.yml'
- '.github/workflows/check.yaml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
enforce-r-dir-policy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Enforce canonical r directory policy
run: |
python scripts/enforce_r_dir_policy.py
load-config:
runs-on: ubuntu-22.04
outputs:
r_pkg_dir: ${{ steps.workflow_config.outputs.r_pkg_dir }}
steps:
- uses: actions/checkout@v4
- name: Set up Python (workflow config loader)
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Load workflow config
id: workflow_config
run: |
python -m pip install --upgrade pip
pip install pyyaml
python .github/scripts/load_workflow_config.py
R-CMD-check:
needs: [enforce-r-dir-policy, load-config]
uses: ./.github/workflows/_reusable-r-check.yml
with:
r_pkg_dir: ${{ needs.load-config.outputs.r_pkg_dir }}
secrets: inherit