Repository navigation
133 lines (125 loc) · 3.78 KB
/
Copy pathtest.yml
File metadata and controls
133 lines (125 loc) · 3.78 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions: read-all
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
- run: npm ci
- run: npm run all
- name: dist/ is up to date
run: git diff --exit-code -- dist/
package:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (R ${{ matrix.r }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel, windows-latest, windows-11-arm]
r: [release]
include:
- {os: ubuntu-latest, r: devel}
- {os: ubuntu-latest, r: oldrel/1}
- {os: ubuntu-latest, r: "4.3"}
- {os: macos-latest, r: devel}
- {os: windows-latest, r: devel}
defaults:
run:
shell: bash
working-directory: __tests__/fixtures/pkg
steps:
- uses: actions/checkout@v5
- id: setup
uses: ./
with:
r-version: ${{ matrix.r }}
working-directory: __tests__/fixtures/pkg
save-cache: "true"
- name: Check outputs
run: |
echo "rig ${{ steps.setup.outputs.rig-version }} at ${{ steps.setup.outputs.rig-path }}"
echo "R ${{ steps.setup.outputs.r-version }} at ${{ steps.setup.outputs.r-path }}"
echo "library ${{ steps.setup.outputs.library }}"
echo "cache ${{ steps.setup.outputs.cache-key }} hit: ${{ steps.setup.outputs.cache-hit }}"
R --version
Rscript -e 'stopifnot(getRversion() == "${{ steps.setup.outputs.r-version }}")'
- name: Install Rtools
run: rig rtools add
- run: rig pkg install --no-install-self --dev .
- run: rig pkg install rcmdcheck
- run: Rscript -e 'library(cli); library(testthat); library(rcmdcheck)'
- uses: r-lib/actions/check-r-package@v2
with:
working-directory: __tests__/fixtures/pkg
args: 'c("--no-manual")'
upload-results: never
project:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
defaults:
run:
shell: bash
working-directory: __tests__/fixtures/proj
steps:
- uses: actions/checkout@v5
- uses: ./
with:
working-directory: __tests__/fixtures/proj
- run: rig proj lock --upgrade && rig proj sync
- run: rig run -e 'library(cli); cli::cli_text("ok")'
container:
runs-on: ubuntu-latest
name: container ${{ matrix.image }}
container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image: ["ubuntu:24.04", "fedora:44"]
steps:
- name: git for checkout
run: |
if command -v apt-get; then apt-get update && apt-get install -y git ca-certificates; fi
if command -v dnf; then dnf install -y git tar xz which; fi
- uses: actions/checkout@v5
- uses: ./
- run: rig pkg install cli && Rscript -e 'library(cli)'
pinned-rig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ./
with:
rig-version: "0.11.1"
enable-cache: "false"
- run: rig --version && R --version
nightly-rig:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- id: setup
uses: ./
with:
rig-version: nightly
enable-cache: "false"
- run: |
rig --version
echo "${{ steps.setup.outputs.rig-version }}" | grep -- -dev
R --version