Skip to content

R-CMD-check.yaml

R-CMD-check.yaml #46

Workflow file for this run

# Workflow adapted 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
on:
push:
branches: [main]
workflow_dispatch:
inputs:
os:
description: 'Operating system to run on'
required: true
default: 'all'
type: choice
options:
- all
- ubuntu-latest
- windows-latest
- macos-13
name: R-CMD-check.yaml
permissions: read-all
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
configs='[
{"os": "ubuntu-latest", "r": "release"},
{"os": "windows-latest", "r": "release"},
{"os": "macos-13", "r": "release"}
]'
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.os }}" != "all" ]; then
# Filter configs for the selected OS
configs=$(echo "$configs" | jq --arg os "${{ inputs.os }}" '[.[] | select(.os == $os)]')
fi
echo "matrix=$configs" >> $GITHUB_OUTPUT
R-CMD-check:
needs: set-matrix
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'