mirror of
https://github.com/msberends/AMR.git
synced 2026-03-19 07:42:25 +01:00
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
This commit is contained in:
@@ -28,9 +28,6 @@
|
|||||||
# ==================================================================== #
|
# ==================================================================== #
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
# run in each PR in this repo
|
|
||||||
branches: '**'
|
|
||||||
push:
|
push:
|
||||||
branches: '**'
|
branches: '**'
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
33
.github/workflows/check-current-testthat.yaml
vendored
33
.github/workflows/check-current-testthat.yaml
vendored
@@ -41,7 +41,22 @@ on:
|
|||||||
name: check-recent
|
name: check-recent
|
||||||
|
|
||||||
jobs:
|
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:
|
R-code-check:
|
||||||
|
needs: setup
|
||||||
runs-on: ${{ matrix.config.os }}
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
|
||||||
continue-on-error: ${{ matrix.config.allowfail }}
|
continue-on-error: ${{ matrix.config.allowfail }}
|
||||||
@@ -50,23 +65,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix: ${{ fromJSON(needs.setup.outputs.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}
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user