Skip to content

Commit 114a478

Browse files
authored
Merge pull request #3 from pfizer-opensource/copilot/add-r-cmd-check-workflow
Add R-CMD-check workflow
2 parents 7885973 + aa0fad8 commit 114a478

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/R-CMD-check.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
branches: [main]
6+
7+
name: R-CMD-check
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: windows-latest, r: 'release'}
23+
- {os: macos-14, r: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel'}
26+
27+
env:
28+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
30+
31+
steps:
32+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
33+
34+
- uses: r-lib/actions/setup-pandoc@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
35+
36+
- uses: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
37+
with:
38+
r-version: ${{ matrix.config.r }}
39+
use-public-rspm: true
40+
41+
- name: Set up Bioconductor repos
42+
run: |
43+
install.packages("BiocManager")
44+
BiocManager::install(version = BiocManager::version(), ask = FALSE, update = FALSE)
45+
shell: Rscript {0}
46+
47+
- uses: r-lib/actions/setup-r-dependencies@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
48+
with:
49+
extra-packages: any::rcmdcheck, any::BiocManager
50+
needs: check
51+
52+
- uses: r-lib/actions/check-r-package@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
53+
with:
54+
upload-snapshots: true
55+
error-on: '"error"'

0 commit comments

Comments
 (0)