-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (42 loc) · 1.17 KB
/
tests.yml
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
name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
test:
name: R
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install bcftools
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install bcftools build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libharfbuzz-dev libfribidi-dev
- name: Install package
run: |
dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)
.libPaths(Sys.getenv("R_LIBS_USER"))
install.packages("devtools")
devtools::install("lostruct")
shell: Rscript {0}
- name: Run tests
run: |
res=devtools::test("lostruct")
df=as.data.frame(res)
if(sum(df$failed) > 0 || any(df$error)) {q(status=1)}
shell: Rscript {0}