-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (47 loc) · 1.39 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
42
43
44
45
46
47
48
49
50
51
52
53
54
image: rocker/tidyverse
stages:
- build
- test
- deploy
building:
stage: build
allow_failure: true
script:
- R -e "remotes::install_local(dependencies = TRUE)"
- R -e 'devtools::check(args = c("--no-examples", "--no-tests"))'
# To have the coverage percentage appear as a gitlab badge follow these
# instructions:
# https://docs.gitlab.com/ee/user/project/pipelines/settings.html#test-coverage-parsing
# The coverage parsing string is
# Coverage: \d+\.\d+
testing:
stage: test
allow_failure: true
when: on_success
only:
- master
script:
- Rscript -e "remotes::install_local(dependencies = TRUE)"
- Rscript -e 'install.packages("DT")'
- Rscript -e 'covr::gitlab(quiet = FALSE)'
artifacts:
paths:
- public
# To produce a code coverage report as a GitLab page see
# https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages/
pages:
stage: deploy
dependencies:
- testing
script:
- Rscript -e "remotes::install_local(dependencies = TRUE)"
- Rscript -e 'install.packages("pkgdown")'
- Rscript -e 'file.create("pkgdown.yml")'
- cp pkgdown.yml public
- Rscript -e 'pkgdown::build_site(override = list(destination = "public"), preview=FALSE)'
artifacts:
paths:
- public
expire_in: 30 days
only:
- master