.gitlab-ci.yml 2.67 KB
Newer Older
1
stages:
Dorchies David's avatar
Dorchies David committed
2
  - check
3
  - scheduled_tests
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 = TRUE)'
12

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

22
.check:
Dorchies David's avatar
Dorchies David committed
23
  stage: check
24
  script:
25
  - R -e 'rcmdcheck::rcmdcheck(args = ifelse(as.logical(Sys.getenv("NOT_CRAN")), "", "--as-cran"), error_on = "warning")'
26
27
28
29
  - R -e 'install.packages("airGR", repos = "http://cran.r-project.org")'
  - Rscript tests/scheduled_tests/benchmarkRunModel.R
  - R CMD INSTALL .
  - Rscript tests/scheduled_tests/benchmarkRunModel.R
30
31

.check_not_cran:
32
33
  variables:
    NOT_CRAN: "true"
34
  extends: .check
35

36
.check_as_cran:
37
38
39
  variables:
    NOT_CRAN: "false"
  extends: .check
40

41
scheduled_tests_patched:
42
43
44
45
46
  # only:
  #   refs:
  #     - dev
  #     - master
  #     - schedules
47
48
  variables:
    R_VERSION: "patched"
49
  extends: .scheduled_tests
50

51
scheduled_tests_devel:
52
53
54
  only:
    refs:
      - schedules
55
56
  variables:
    R_VERSION: "devel"
57
  extends: .scheduled_tests
58

59
scheduled_tests_oldrel:
60
61
62
  only:
    refs:
      - schedules
63
64
  variables:
    R_VERSION: "oldrel"
65
  extends: .scheduled_tests
66

67
68
69
check_not_cran_patched:
  variables:
    R_VERSION: "patched"
70
  extends: .check_not_cran
71
72
73
74

check_as_cran_patched:
  variables:
    R_VERSION: "patched"
75
  extends: .check_as_cran
76
77

check_not_cran_devel:
78
  only:
79
80
81
82
83
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
84
  extends: .check_not_cran
85
86

check_as_cran_devel:
87
  only:
88
89
90
91
92
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
93
  extends: .check_as_cran
94
95

check_not_cran_oldrel:
96
  only:
97
98
99
100
101
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
102
  extends: .check_not_cran
103
104

check_as_cran_oldrel:
105
  only:
106
107
108
109
110
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
111
  extends: .check_as_cran
Dorchies David's avatar
Dorchies David committed
112
113
114

revdepcheck_patched:
  stage: revdepcheck
115
116
117
118
  # only:
  #   refs:
  #     - tags
  #     - schedules
Dorchies David's avatar
Dorchies David committed
119
120
121
122
123
124
  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()'
125
126
127
128
129
130
  artifacts:
    paths:
      - revdep/README.md
      - revdep/problems.md
      - revdep/failures.md
      - revdep/cran.md