-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.06 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
on:
push:
branches:
- master
pull_request:
name: R CMD check
jobs:
check:
name: R CMD check
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:devel
steps:
- uses: actions/checkout@v3
- name: Set directories
run: |
echo "R_PKG_DIR=${R_HOME}/site-library" >> $GITHUB_ENV
- name: Restore the package directory
uses: actions/cache@v3
with:
path: ${{ env.R_PKG_DIR }}
key: check-packages
- name: Install dependencies
shell: Rscript {0}
run: |
stuff <- read.dcf("DESCRIPTION")
stuff <- stuff[,intersect(colnames(stuff), c("Imports", "LinkingTo", "Suggests", "Depends"))]
deps <- sub(" .*", "", unlist(strsplit(stuff, ",\\s*"), use.names=FALSE))
BiocManager::install(deps)
- name: Build the package
run: R CMD build .
- name: Check the package
run: |
tarball=$(ls *.tar.gz)
R CMD check --no-manual $tarball