-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (84 loc) · 2.98 KB
/
R-CMD-check.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
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
on:
push:
pull_request:
branches:
- master
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.image }}
name: ${{ matrix.config.os }} (${{ matrix.config.bioc }} - ${{ matrix.config.image }})
strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, bioc: 'release'}
- { os: windows-latest, bioc: 'devel'}
- { os: macOS-latest, bioc: 'release'}
- { os: macOS-latest, bioc: 'devel'}
- { os: ubuntu-latest, bioc: 'release'}
- { os: ubuntu-latest, bioc: 'devel'}
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: grimbough/bioc-actions/setup-bioc@v1
if: matrix.config.image == null
with:
bioc-version: ${{ matrix.config.bioc }}
- name: Install magick dependencies
if: runner.os == 'macOS'
run: |
brew install imagemagick
brew install ffmpeg
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck, optparse, magick, BiocManager, devtools
- name: Install BiocCheck
if: runner.os == 'Linux'
run: BiocManager::install("BiocCheck")
shell: Rscript {0}
- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@v2
if: matrix.config.image == null
- name: basilisk utils
if: matrix.config.os == 'windows-latest' && matrix.config.bioc == 'devel'
run: |
devtools::install_github("alanocallaghan/basilisk.utils")
shell: Rscript {0}
- name: Debug
if: matrix.config.os == 'windows-latest' && matrix.config.bioc == 'devel'
run: |
devtools::load_all()
m <- matrix(rnorm(2000), ncol=20)
out <- fitsne(m, random_state = 42L)
shell: Rscript {0}
- name: Check
uses: r-lib/actions/check-r-package@v2
- name: BiocCheck
if: runner.os == 'Linux'
run: BiocCheck::BiocCheck(dir('check', 'tar.gz$', full.names = TRUE), `quit-with-status` = TRUE)
shell: Rscript {0}
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-results
path: check
- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
run: |
install.packages("covr")
covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")
shell: Rscript {0}