-
-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (64 loc) · 2.4 KB
/
main-04-R-CMD-check-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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}'