Skip to content

main-03-R-CMD-check-mac #42

main-03-R-CMD-check-mac

main-03-R-CMD-check-mac #42

name: R-CMD-check on Mac
on:
workflow_dispatch:
inputs:
trigger_next:
description: 'Whether to run the subsequent workflows after triggering this one manually.'
required: false
default: false
repository_dispatch:
types: [main-03-R-CMD-check-mac]
jobs:
R-CMD-check-mac:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
max-parallel: 1
matrix:
config:
- {os: macOS-latest, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
SALESFORCER_USERNAME: ${{ secrets.SALESFORCER_USERNAME }}
SALESFORCER_TOKEN_PATH: ${{ github.workspace }}/tests/testthat/
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.sha }}
- name: Decrypt OAuth Token
run: |
./.github/scripts/decrypt_secret.sh
env:
SALESFORCER_TOKEN_PASSPHRASE: ${{ secrets.SALESFORCER_TOKEN_PASSPHRASE }}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: ${{ matrix.config.r }}
- 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")'
- name: Trigger next workflow
if: ${{ (github.event_name != 'workflow_dispatch' && success()) || (github.event_name == 'workflow_dispatch' && github.event.inputs.trigger_next && success()) }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_GHA_PAT }}
repository: StevenMMortimer/salesforcer
event-type: main-04-R-CMD-check-windows
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
- name: Set final R-CMD-check status
if: ${{ (github.event_name != 'workflow_dispatch' && failure()) }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_GHA_PAT }}
repository: StevenMMortimer/salesforcer
event-type: main-06-R-CMD-check-final
client-payload: '{"success": false}'