main-04-R-CMD-check-windows #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R-CMD-check on Windows | |
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-04-R-CMD-check-windows] | |
jobs: | |
R-CMD-check-windows: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
config: | |
- {os: windows-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 }} | |
shell: bash | |
- 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-05-R-CMD-check-linux | |
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}' |