.gitlab-ci.yml 2.47 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

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

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

37
scheduled_tests_patched:
38
39
40
41
42
  # only:
  #   refs:
  #     - dev
  #     - master
  #     - schedules
43
44
  variables:
    R_VERSION: "patched"
45
  extends: .scheduled_tests
46

47
scheduled_tests_devel:
48
49
50
  only:
    refs:
      - schedules
51
52
  variables:
    R_VERSION: "devel"
53
  extends: .scheduled_tests
54

55
scheduled_tests_oldrel:
56
57
58
  only:
    refs:
      - schedules
59
60
  variables:
    R_VERSION: "oldrel"
61
  extends: .scheduled_tests
62

63
64
65
check_not_cran_patched:
  variables:
    R_VERSION: "patched"
66
  extends: .check_not_cran
67
68
69
70

check_as_cran_patched:
  variables:
    R_VERSION: "patched"
71
  extends: .check_as_cran
72
73

check_not_cran_devel:
74
  only:
75
76
77
78
79
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
80
  extends: .check_not_cran
81
82

check_as_cran_devel:
83
  only:
84
85
86
87
88
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "devel"
89
  extends: .check_as_cran
90
91

check_not_cran_oldrel:
92
  only:
93
94
95
96
97
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
98
  extends: .check_not_cran
99
100

check_as_cran_oldrel:
101
  only:
102
103
104
105
106
    refs:
      - tags
      - schedules
  variables:
    R_VERSION: "oldrel"
107
  extends: .check_as_cran
Dorchies David's avatar
Dorchies David committed
108
109
110

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