-
Notifications
You must be signed in to change notification settings - Fork 99
37 lines (29 loc) · 929 Bytes
/
test.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
name: R-Package-Test
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install system dependencies
run: sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev
- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}-${{ matrix.config.r }}
restore-keys: |
${{ runner.os }}-r-${{ matrix.config.r }}-
${{ runner.os }}-r-
- name: Install R package dependencies
run: R -e "install.packages('devtools'); devtools::install_deps(dependencies = TRUE)"
- name: Run tests
run: R -e "devtools::test()"