-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
167 lines (159 loc) · 2.67 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
stages:
- build
- test
- prepare
- deploy
# Cache gems in between builds
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- vendor/ruby
- vendor/jruby
.before_script: &before_script
- bundle install
.system_deps: &system_deps
- apt-get update && apt-get install -y libsqlite3-dev
.test: &test
- bundle exec rake check_method_doc
- bundle exec rake test
variables:
BUNDLE_JOBS: 10
BUNDLE_PATH: vendor
CI: 1
PARALLEL: 1
jruby:
cache:
paths:
- vendor/jruby
allow_failure: true
variables:
JRUBY_OPTS: --debug
before_script:
- apt-get update && apt-get install -y
- *before_script
image: "jruby:9.4"
script:
- *test
artifacts:
paths:
- "coverage/"
truffleruby:
allow_failure: true
before_script:
- dnf install -y gcc make sqlite-devel git libxslt-devel libxml2-devel xz
- *before_script
image: "ghcr.io/graalvm/truffleruby-community:latest"
script:
- *test
artifacts:
paths:
- "coverage/"
ruby24:
before_script:
- *system_deps
- *before_script
image: "ruby:2.4"
script:
- *test
ruby25:
before_script:
- *system_deps
- *before_script
image: "ruby:2.5"
only:
- master
script:
- *test
ruby26:
before_script:
- *system_deps
- *before_script
image: "ruby:2.6"
only:
- master
script:
- *test
ruby27:
before_script:
- *system_deps
- *before_script
image: "ruby:2.7"
script:
- *test
artifacts:
paths:
- "coverage/"
ruby30:
before_script:
- *system_deps
- *before_script
image: "ruby:3.0"
script:
- *test
artifacts:
paths:
- "coverage/"
ruby31:
before_script:
- *system_deps
- *before_script
image: "ruby:3.1"
script:
- bundle exec rake rubocop
- *test
artifacts:
paths:
- "coverage/"
ruby32:
before_script:
- *system_deps
- *before_script
image: "ruby:3.2"
script:
- bundle exec rake rubocop
- *test
artifacts:
paths:
- "coverage/"
ruby33:
before_script:
- *system_deps
- *before_script
image: "ruby:3.3"
script:
- bundle exec rake rubocop
- *test
artifacts:
paths:
- "coverage/"
coverage:
stage: prepare
coverage: '/\(\d+.\d+%\) covered/'
before_script:
- *system_deps
- *before_script
dependencies:
- jruby
- truffleruby
- ruby24
- ruby27
- ruby33
image: "ruby:3.3"
script:
- bundle exec rake coverage:report
artifacts:
paths:
- "coverage/"
pages:
stage: deploy
dependencies:
- coverage
script:
- mkdir public
- mv coverage public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master