-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
41 lines (36 loc) · 1.1 KB
/
.gitlab-ci.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
image: images.sbgenomics.com/marko_trifunovic/sbshinymodules-ci-docker:latest
stages:
- build # Build the R package binaries
- document # Generate package documentation using 'roxygen2'
- check # Run various checks (linting, coverage) on the codebase
- deploy # Deploy the package site using pkgdown
buildbinary:
stage: build
script:
- R -e 'devtools::build(binary = TRUE, vignettes = FALSE)'
documentation:
stage: document
script:
- R -e 'devtools::document()'
lintr:
stage: check
script:
# redirect lintr stdout and stderr to file
- R -e "install.packages('lintr')"
- CI="" Rscript -e "lintr::lint_package()" &> lint_output.txt
# fail if file is not empty
- if [ -s "lint_output.txt" ]; then exit 1; fi
artifacts:
when: on_failure
paths:
- lint_output.txt
pages:
stage: deploy
script:
- apt-get update && apt-get install -y pandoc
- R -e 'devtools::build(binary = TRUE, vignettes = FALSE)'
- R -e "install.packages('pkgdown')"
- R -e "pkgdown::build_site(examples = FALSE)"
artifacts:
paths:
- public