-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (65 loc) · 2.25 KB
/
R-CMD-check-versions.yaml
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
---
# R-CMD check which allows you to lock the R version and date of the CRAN snapshot.
# This is particularly helpful for ensuring that the package works with internal systems.
on:
workflow_dispatch:
workflow_call:
name: R-CMD-check-versions
jobs:
R-CMD-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (R ${{ matrix.config.r }}, CRAN ${{ matrix.config.date }})
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
config:
- date: 'latest'
r: 'release'
- date: 2023-10-25 # Lock the date of the CRAN snapshot
r: 4.3.1
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: false
- name: Determine the CRAN image to use
id: cran-image
run: |
if [ "${{ matrix.config.date }}" == "latest" ]; then
echo "image=https://cloud.r-project.org" >> $GITHUB_OUTPUT
else
echo "image=https://packagemanager.posit.co/cran/${{ matrix.config.date }}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Debug image
run: |
echo ${{ steps.cran-image.outputs.image }}
shell: bash
- name: Install R dependencies (custom)
uses: hta-pharma/ramnog/.github/actions/setup-r-dependencies@main
with:
cache: true
dependency_repo: ${{ steps.cran-image.outputs.image }}
working-directory: ${{ github.workspace }}
extra-packages: any::rcmdcheck
- name: Session info
run: |
sessionInfo()
installed.packages()[,c("Package", "Version")]
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
upload-snapshots: true
error-on: '"error"'
check-dir: '"check"'
upload-results: true