-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (39 loc) · 1.19 KB
/
run-tests.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
name: Run tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/ctsit/rstudio-ci:latest
env:
CI: "TRUE"
R_LIBS_USER: /github/home/R/x86_64-pc-linux-gnu-library/4.4
R_LIB_FOR_PAK: /usr/local/lib/R/site-library
steps:
- uses: actions/checkout@v2
# Restore R dependencies cache
- name: Restore R Dependencies Cache
uses: actions/cache@v4
with:
path: /github/home/R/x86_64-pc-linux-gnu-library/4.4
key: ${{ runner.os }}-r-libs-${{ hashFiles('DESCRIPTION') }}
restore-keys: |
${{ runner.os }}-r-libs-
# Install R dependencies
- name: Install R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
# Run tests
- name: Run Tests
run: devtools::test(stop_on_failure = TRUE)
shell: Rscript {0}
- name: Save R Dependencies Cache
uses: actions/cache@v4
with:
path: /github/home/R/x86_64-pc-linux-gnu-library/4.4
key: ${{ runner.os }}-r-libs-${{ hashFiles('DESCRIPTION') }}