-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
72 lines (61 loc) · 1.63 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
stages:
- checks
- publish
default:
tags: [docker]
image: rocker/verse:devel
variables:
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib"
cache:
paths:
- $R_LIBS_USER
before_script:
- mkdir -p $R_LIBS_USER
- echo "R_LIBS='$R_LIBS_USER'" > .Renviron
- R -e 'remotes::install_git("https://gitlab.irstea.fr/HYCAR-Hydro/airgr.git", ref = "dev")'
- R -e 'devtools::install_deps(dep = T)'
test_all:
stage: checks
script:
- R -q -e 'options(error = function() quit(save = "no", status = 1)); testthat::test_local(stop_on_failure = TRUE, stop_on_warning = TRUE)'
run_examples:
stage: checks
script:
- R -q -e 'options(error = function() quit(save = "no", status = 1)); devtools::run_examples(run_donttest = TRUE, run_dontrun = TRUE)'
check:
stage: checks
except:
refs:
- tags
- schedules
script:
- tlmgr update --self && tlmgr install ec epstopdf-pkg amsmath
- R -q -e 'remotes::update_packages("rcmdcheck")'
- R -q -e 'options(error = function() quit(save = "no", status = 1)); rcmdcheck::rcmdcheck(args = "--as-cran", error_on = "warning")'
.github:
stage: publish
except:
refs:
- schedules
before_script:
- git config --global user.email "[email protected]"
- git config --global user.name "Gitlab CI"
- git remote add github ${GITHUB_CLONE} || git remote set-url github ${GITHUB_CLONE}
- git fetch
github_master_dev:
extends:
- .github
only:
refs:
- master
- dev
script:
- git push --force github HEAD:refs/heads/$CI_COMMIT_BRANCH
github_tags:
extends:
- .github
only:
refs:
- tags
script:
- git push --force --tags github