-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.58 KB
/
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
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
on:
push:
pull_request:
branches:
- master
name: test
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.image }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }} - ${{ matrix.config.bioc }} - ${{ matrix.config.image }})
strategy:
fail-fast: false
matrix:
config:
#- { os: windows-latest, r: 'devel', bioc: 'devel'}
- { os: windows-latest, r: '4.1', bioc: 'devel'}
#- { os: macOS-latest, r: 'release', bioc: '3.12'}
- { os: macOS-latest, r: '4.1', bioc: 'devel'}
#- { os: ubuntu-16.04, r: 'release', bioc: '3.12', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
#- { os: ubuntu-16.04, r: 'devel', bioc: 'devel', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-latest, r: '4.1', image: 'bioconductor/bioconductor_docker:devel'}
#- { os: ubuntu-latest, r: 'release', image: 'bioconductor/bioconductor_docker:RELEASE_3_12'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
CRAN: ${{ matrix.config.cran }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Set up R
uses: r-lib/actions/setup-r@master
if: matrix.config.image == null
with:
r-version: ${{ matrix.config.r }}
- name: Set BiocManager version
if: matrix.config.image == null
run: |
install.packages('BiocManager')
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
shell: Rscript {0}
- name: Cache R packages
if: runner.os != 'Windows' && matrix.config.image == null
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-${{ hashFiles('depends.txt') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-
- name: Install R package dependencies
run: |
pkgs <- unique(grep("^#", readLines("depends.txt"), value = TRUE, invert = TRUE))
BiocManager::install(pkgs, Ncpu = 2L)
shell: Rscript {0}
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Run test code
run: |
source("tests.R")
shell: Rscript {0}