From 11c175ae19bf8a3480a0e956b9d22152a93db51f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Mar 2026 23:06:36 +0000 Subject: [PATCH] Slim CI matrix for PRs to ubuntu-latest / r-release only For pull requests, check-recent now runs a single job (ubuntu-latest, r-release) via a setup job that emits the matrix as JSON. On push and schedule the full matrix is unchanged (devel + release on all OSes, oldrel-1 through oldrel-4). Also removed the pull_request trigger from check-recent-dev-pkgs; the dev-packages check only needs to run on push/schedule. https://claude.ai/code/session_01XHWLohiSTdZvCutwD7ag2b --- .../check-current-testthat-dev-versions.yaml | 3 -- .github/workflows/check-current-testthat.yaml | 33 +++++++++---------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/check-current-testthat-dev-versions.yaml b/.github/workflows/check-current-testthat-dev-versions.yaml index 5d3b4dc55..4899143bb 100644 --- a/.github/workflows/check-current-testthat-dev-versions.yaml +++ b/.github/workflows/check-current-testthat-dev-versions.yaml @@ -28,9 +28,6 @@ # ==================================================================== # on: - pull_request: - # run in each PR in this repo - branches: '**' push: branches: '**' schedule: diff --git a/.github/workflows/check-current-testthat.yaml b/.github/workflows/check-current-testthat.yaml index d59035888..676a01e04 100644 --- a/.github/workflows/check-current-testthat.yaml +++ b/.github/workflows/check-current-testthat.yaml @@ -41,7 +41,22 @@ on: name: check-recent jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + shell: bash + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo 'matrix={"config":[{"os":"ubuntu-latest","r":"release","allowfail":false}]}' >> "$GITHUB_OUTPUT" + else + echo 'matrix={"config":[{"os":"windows-latest","r":"devel","allowfail":false},{"os":"ubuntu-latest","r":"devel","allowfail":false,"http-user-agent":"release"},{"os":"macOS-latest","r":"release","allowfail":true},{"os":"windows-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"release","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-1","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-2","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-3","allowfail":false},{"os":"ubuntu-latest","r":"oldrel-4","allowfail":false}]}' >> "$GITHUB_OUTPUT" + fi + R-code-check: + needs: setup runs-on: ${{ matrix.config.os }} continue-on-error: ${{ matrix.config.allowfail }} @@ -50,23 +65,7 @@ jobs: strategy: fail-fast: false - matrix: - config: - # current development version, check all major OSes: - # - {os: macOS-latest, r: 'devel', allowfail: true} - - {os: windows-latest, r: 'devel', allowfail: false} - - {os: ubuntu-latest, r: 'devel', allowfail: false, http-user-agent: 'release'} - - # current 'release' version, check all major OSes: - - {os: macOS-latest, r: 'release', allowfail: true} - - {os: windows-latest, r: 'release', allowfail: false} - - {os: ubuntu-latest, r: 'release', allowfail: false} - - # older versions (see also check-old-tinytest.yaml for even older versions): - - {os: ubuntu-latest, r: 'oldrel-1', allowfail: false} - - {os: ubuntu-latest, r: 'oldrel-2', allowfail: false} - - {os: ubuntu-latest, r: 'oldrel-3', allowfail: false} - - {os: ubuntu-latest, r: 'oldrel-4', allowfail: false} + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}