From f6aa3efdfdd732cdf5ba0f830f670eceec724877 Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Mon, 31 Aug 2026 12:52:40 -0700 Subject: [PATCH] ci: migrate R-CMD-check to the org reusable workflow Replaces this repo's hand-rolled matrix with a thin caller, so third-party action versions, system dependencies, caching and the check itself are maintained in one place instead of 17. Bumping actions/checkout there now updates every repo at once. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa --- .github/workflows/R-CMD-check.yaml | 74 ++++++++---------------------- 1 file changed, 18 insertions(+), 56 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0cee379..d6a2a81 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,62 +1,24 @@ +## Thin caller -- the matrix, system dependencies, caching, Drive staging +## and the check itself all live in PredictiveEcology/actions. This file only +## says which package to check and what it needs on top of the org defaults. +## +## Pinned @main deliberately: tags freeze and rot (v0.1/v0.2 kept the +## ubuntugis PPA for months after the workflows rejected it). The actions repo +## gates merges with its own self-test CI. + +name: R-CMD-check + on: push: - branches: - - main - - master - - development - - LandWeb + branches: [main, master, development, LandWeb] pull_request: - branches: - - main - - master - - development - -name: R-CMD-check + branches: [main, master, development, LandWeb] jobs: R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}, nosuggests ${{ matrix.config.nosuggests }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: macOS-latest, nosuggests: false, r: 'release'} - - {os: windows-latest, nosuggests: false, r: 'devel'} - - {os: windows-latest, nosuggests: false, r: 'release'} - - {os: windows-latest, nosuggests: false, r: 'oldrel-1'} - - {os: windows-latest, nosuggests: false, r: 'oldrel-2'} - - {os: ubuntu-latest, nosuggests: false, r: 'devel'} - - {os: ubuntu-latest, nosuggests: false, r: 'release'} - - {os: ubuntu-latest, nosuggests: true, r: 'release'} - - {os: ubuntu-latest, nosuggests: false, r: 'oldrel-1'} - - {os: ubuntu-latest, nosuggests: false, r: 'oldrel-2'} - - env: - _R_CHECK_DEPENDS_ONLY_: ${{ matrix.config.nosuggests }} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: PredictiveEcology/actions/install-spatial-deps@v0.2 - - - uses: r-lib/actions/setup-r@v2 - with: - Ncpus: 2 - r-version: ${{ matrix.config.r }} - use-public-rspm: false - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::rcmdcheck - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true + uses: PredictiveEcology/actions/.github/workflows/R-CMD-check.yaml@main + with: + ## Legs beyond the org default 8. These still work and are + ## deliberate back-compat coverage, so they are preserved. + extra-config: | + [{"config": {"os": "ubuntu-latest", "nosuggests": false, "r": "oldrel-2"}}, {"config": {"os": "windows-latest", "nosuggests": false, "r": "oldrel-2"}}]