.gitlab-ci.yml 2.33 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.R
    - Rscript tests/regression.R stable
18
    - R CMD INSTALL .
19
20
    - Rscript tests/regression.R dev
    - Rscript 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
  variables:
    R_VERSION: "patched"
40
  extends: .scheduled_tests
41

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

50
scheduled_tests_oldrel:
51
52
53
  only:
    refs:
      - schedules
54
55
  variables:
    R_VERSION: "oldrel"
56
  extends: .scheduled_tests
57

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

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

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

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

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

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

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