blob: 6ea6d8e523cbe72cf5e2e218c5ca26b1adf49178 (
plain)
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
include:
- local: .gitlab/ci/global.gitlab-ci.yml
- local: .gitlab/ci/rules.gitlab-ci.yml
.rules:dont-interrupt:
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
allow_failure: true
- if: $CI_MERGE_REQUEST_IID
when: manual
allow_failure: true
#######################
# rspec job base specs
.rails-job-base:
extends:
- .default-retry
- .default-before_script
- .ruby-cache
.base-script:
script:
- source ./scripts/rspec_helpers.sh
# Only install knapsack after bundle install! Otherwise oddly some native
# gems could not be found under some circumstance. No idea why, hours wasted.
- run_timed_command "gem install knapsack --no-document"
- echo -e "\e[0Ksection_start:`date +%s`:gitaly-test-spawn[collapsed=true]\r\e[0KStarting Gitaly"
- section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn" # Do not use 'bundle exec' here
- echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-spawn\r\e[0K"
.no-redis-cluster:
variables:
USE_REDIS_CLUSTER: "false"
.single-db:
variables:
DECOMPOSED_DB: "false"
.single-db-ci-connection:
extends: .single-db
variables:
CI_CONNECTION_DB: "true"
.single-db-rspec:
extends: .single-db
.single-db-ci-connection-rspec:
extends: .single-db-ci-connection
.praefect-with-db:
variables:
GITALY_PRAEFECT_WITH_DB: '1'
.rspec-base:
extends:
- .rails-job-base
- .base-artifacts
stage: test
variables:
RUBY_GC_MALLOC_LIMIT: 67108864
RUBY_GC_MALLOC_LIMIT_MAX: 134217728
RECORD_DEPRECATIONS: "true"
GEO_SECONDARY_PROXY: 0
SUCCESSFULLY_RETRIED_TEST_EXIT_CODE: 137
needs:
- job: "setup-test-env"
- job: "retrieve-tests-metadata"
- job: "compile-test-assets"
- job: "detect-tests"
optional: true
script:
- !reference [.base-script, script]
# We need to exclude background migration because unit tests run with
# spec/lib, yet background migration tests are also sitting there,
# and they should run on their own jobs so we don't need to run them
# in unit tests again.
- rspec_paralellized_job "--tag ~quarantine --tag ~level:background_migration"
after_script:
- echo -e "\e[0Ksection_start:`date +%s`:report_results_section[collapsed=true]\r\e[0KReport results"
- |
if [ "$CREATE_RAILS_TEST_FAILURE_ISSUES" == "true" ]; then
bundle exec relate-failure-issue --input-files "rspec/rspec-*.json" --system-log-files "log" --project "gitlab-org-sandbox/rails-test-failures" --token "${RAILS_TEST_FAILURES_PROJECT_TOKEN}";
fi
- echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K"
allow_failure:
exit_codes: !reference [.rspec-base, variables, SUCCESSFULLY_RETRIED_TEST_EXIT_CODE]
.base-artifacts:
artifacts:
expire_in: 31d
when: always
paths:
- coverage/
- crystalball/
- deprecations/
- knapsack/
- query_recorder/
- rspec/
- tmp/capybara/
- log/*.log
reports:
junit: "rspec/rspec-*.xml"
.rspec-base-migration:
script:
- !reference [.base-script, script]
- rspec_paralellized_job "--tag ~quarantine --tag ~zoekt"
after_script:
- !reference [.rspec-base, after_script]
.rspec-base-pg12:
extends:
- .rspec-base
- .use-pg12
.rspec-base-pg13:
extends:
- .rspec-base
- .use-pg13
.rspec-base-pg14:
extends:
- .rspec-base
- .use-pg14
.rspec-base-pg14-as-if-foss:
extends:
- .rspec-base
- .as-if-foss
- .use-pg14
needs:
- job: "setup-test-env"
- job: "retrieve-tests-metadata"
- job: "compile-test-assets as-if-foss"
- job: "detect-tests"
optional: true
.rspec-base-pg15:
extends:
- .rspec-base
- .use-pg15
.rspec-ee-base-pg12:
extends:
- .rspec-base
- .use-pg12-es7-ee
.rspec-ee-base-pg13:
extends:
- .rspec-base
- .use-pg13-es7-ee
.rspec-ee-base-pg13-es8:
extends:
- .rspec-base
- .use-pg13-es8-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg13-opensearch1:
extends:
- .rspec-base
- .use-pg13-opensearch1-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg13-opensearch2:
extends:
- .rspec-base
- .use-pg13-opensearch2-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg14:
extends:
- .rspec-base
- .use-pg14-es7-ee
.rspec-ee-base-pg14-es8:
extends:
- .rspec-base
- .use-pg14-es8-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg14-opensearch1:
extends:
- .rspec-base
- .use-pg14-opensearch1-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg14-opensearch2:
extends:
- .rspec-base
- .use-pg14-opensearch2-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg15:
extends:
- .rspec-base
- .use-pg15-es7-ee
.rspec-ee-base-pg15-es8:
extends:
- .rspec-base
- .use-pg15-es8-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg15-opensearch1:
extends:
- .rspec-base
- .use-pg15-opensearch1-ee
- .rails:rules:run-search-tests
.rspec-ee-base-pg15-opensearch2:
extends:
- .rspec-base
- .use-pg15-opensearch2-ee
- .rails:rules:run-search-tests
.db-job-base:
extends:
- .rails-job-base
- .rails:rules:ee-and-foss-migration
- .use-pg14
stage: test
needs: ["setup-test-env"]
# rspec job base specs
######################
############################
# rspec job parallel configs
# Adjusting these parallel job counts has an impact on the
# rspec:artifact-collector jobs in .gitlab/ci/rails.gitlab-ci.yml
# Please double-check and adjust accordingly
.rspec-migration-parallel:
parallel: 8
.rspec-background-migration-parallel:
parallel: 4
.rspec-ee-migration-parallel:
parallel: 2
.rspec-ee-background-migration-parallel:
parallel: 2
.rspec-unit-parallel:
parallel: 28
.rspec-ee-unit-parallel:
parallel: 18
.rspec-integration-parallel:
parallel: 12
.rspec-ee-integration-parallel:
parallel: 6
.rspec-system-parallel:
parallel: 28
.rspec-ee-system-parallel:
parallel: 10
# rspec job parallel configs
############################
|