.gitlab-ci.yml 2.3 KB
Newer Older
1
stages:
Dorchies David's avatar
Dorchies David committed
2
  - check
3
  - regression
Dorchies David's avatar
Dorchies David committed
4
  - revdepcheck
5

6
7
8
default:
  before_script:
    - echo "setwd(\"$(pwd)\")" > .Rprofile
9
    - echo ".libPaths <- c(Sys.getenv(\"R_LIBS_USER\"), .libPaths())" >> .Rprofile
10
    - PATH=~/R/sources/R-${R_VERSION}/bin:$PATH
11
    - R -e 'remotes::install_deps(dep = T)'
12

13
14
15
.regression:
  stage: regression
  script:
16
17
18
19
    - Rscript tests/testthat/regression_tests.R stable
    - R CMD INSTALL .
    - Rscript tests/testthat/regression_tests.R dev
    - Rscript tests/testthat/regression_tests.R compare
20

21
.check:
Dorchies David's avatar
Dorchies David committed
22
  stage: check
23
  script:
24
  - R -e ' rcmdcheck::rcmdcheck(args = ifelse(as.logical(Sys.getenv("NOT_CRAN")), "", "--as-cran"), error_on = "warning")'
25
26

.check_not_cran:
27
28
  variables:
    NOT_CRAN: "true"
29
  extends: .check
30

31
.check_as_cran:
32
33
34
  variables:
    NOT_CRAN: "false"
  extends: .check
35

36
37
38
39
40
41
regression_patched:
  variables:
    R_VERSION: "patched"
  extends: .regression

regression_devel:
42
43
44
  only:
    refs:
      - schedules
45
46
47
48
49
  variables:
    R_VERSION: "devel"
  extends: .regression

regression_oldrel:
50
51
52
  only:
    refs:
      - schedules
53
54
55
56
  variables:
    R_VERSION: "oldrel"
  extends: .regression

57
58
59
check_not_cran_patched:
  variables:
    R_VERSION: "patched"
60
  extends: .check_not_cran
61
62
63
64

check_as_cran_patched:
  variables:
    R_VERSION: "patched"
65
  extends: .check_as_cran
66
67

check_not_cran_devel:
68
  only:
69
70
71
72
73
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
74
  extends: .check_not_cran
75
76

check_as_cran_devel:
77
  only:
78
79
80
81
82
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
83
  extends: .check_as_cran
84
85

check_not_cran_oldrel:
86
  only:
87
88
89
90
91
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
92
  extends: .check_not_cran
93
94

check_as_cran_oldrel:
95
  only:
96
97
98
99
100
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
101
  extends: .check_as_cran
Dorchies David's avatar
Dorchies David committed
102
103
104

revdepcheck_patched:
  stage: revdepcheck
105
106
107
108
  only:
    refs:
      - tags
      - schedules
Dorchies David's avatar
Dorchies David committed
109
110
111
112
113
114
  variables:
    R_VERSION: "patched"
  script:
    - R -e 'remotes::install_github("https://github.com/r-lib/revdepcheck")'
    - R -e 'revdepcheck::revdep_check(num_workers = 2)'
    - R -e 'if (any(sapply(revdepcheck::revdep_summary(), function(x) {any(x$cmp$change == 1)}))) stop()'
115
116
117
118
119
120
  artifacts:
    paths:
      - revdep/README.md
      - revdep/problems.md
      - revdep/failures.md
      - revdep/cran.md