16
16
executors :
17
17
java :
18
18
docker :
19
- - image : velo/toolchains-4-ci-builds:with-21
19
+ - image : velo/toolchains-4-ci-builds:latest
20
20
21
21
# common commands
22
22
commands :
@@ -38,6 +38,32 @@ commands:
38
38
when : always
39
39
- store_test_results :
40
40
path : ~/test-results
41
+ - run :
42
+ name : Codecov
43
+ command : |
44
+ set -x
45
+
46
+ curl -Os https://cli.codecov.io/latest/linux/codecov
47
+ chmod +x codecov
48
+
49
+ # Prepare extra arguments: include pull request number if set
50
+ EXTRA=""
51
+ if [ -n "$CIRCLE_PR_NUMBER" ]; then
52
+ EXTRA="--pull-request-number $CIRCLE_PR_NUMBER"
53
+ fi
54
+
55
+ # Build the set of common arguments.
56
+ COMMON_ARGS="--token $CODECOV_TOKEN --branch $CIRCLE_BRANCH --commit-sha $CIRCLE_SHA1 $EXTRA --recurse-submodules --git-service github"
57
+
58
+ ls -lha
59
+
60
+ ./codecov --version
61
+
62
+ # Upload the coverage report.
63
+ ./codecov upload-coverage $COMMON_ARGS
64
+
65
+ # Upload the test reports.
66
+ ./codecov do-upload --report-type test_results $COMMON_ARGS
41
67
42
68
configure-gpg :
43
69
steps :
@@ -80,13 +106,12 @@ jobs:
80
106
<< : *defaults
81
107
working_directory : ~/querydsl
82
108
docker :
83
- - image : velo/toolchains-4-ci-builds:with-21
109
+ - image : velo/toolchains-4-ci-builds:latest
84
110
steps :
85
111
- checkout
86
112
- restore_cache :
87
113
keys :
88
114
- querydsl-dependencies-{{ checksum "pom.xml" }}
89
- - querydsl-dependencies-
90
115
- resolve-dependencies
91
116
- save_cache :
92
117
paths :
@@ -96,13 +121,12 @@ jobs:
96
121
<< : *defaults
97
122
working_directory : ~/querydsl
98
123
docker :
99
- - image : velo/toolchains-4-ci-builds:with-21
124
+ - image : velo/toolchains-4-ci-builds:latest
100
125
steps :
101
126
- checkout
102
127
- restore_cache :
103
128
keys :
104
129
- querydsl-dependencies-{{ checksum "pom.xml" }}
105
- - querydsl-dependencies-
106
130
- run :
107
131
name : ' Test'
108
132
command : |
@@ -119,7 +143,6 @@ jobs:
119
143
- restore_cache :
120
144
keys :
121
145
- querydsl-dependencies-{{ checksum "pom.xml" }}
122
- - querydsl-dependencies-
123
146
- run :
124
147
name : ' Test'
125
148
command : |
@@ -130,21 +153,20 @@ jobs:
130
153
<< : *defaults
131
154
working_directory : ~/querydsl
132
155
docker :
133
- - image : velo/toolchains-4-ci-builds:with-docker
156
+ - image : velo/toolchains-4-ci-builds:latest
134
157
steps :
135
158
- checkout
136
159
- restore_cache :
137
160
keys :
138
161
- querydsl-dependencies-{{ checksum "pom.xml" }}
139
- - querydsl-dependencies-
140
162
- run :
141
163
name : ' Prepare environment'
142
164
command : |
143
165
./mvnw -ntp -B install -Pquickbuild -pl :querydsl-sql-spring,:querydsl-jpa-spring,:querydsl-kotlin-codegen,:querydsl-mongodb,:querydsl-r2dbc,:querydsl-sql-json -am -T2
144
166
- run :
145
167
name : ' Build and test examples'
146
168
command : |
147
- ./mvnw -ntp -B verify -Pexamples -rf :querydsl-examples
169
+ ./mvnw -ntp -B install -Pexamples -rf :querydsl-examples
148
170
- save-test-results
149
171
buildQuarkusExample :
150
172
<< : *defaults
@@ -164,7 +186,7 @@ jobs:
164
186
<< : *defaults
165
187
working_directory : ~/querydsl
166
188
docker :
167
- - image : velo/toolchains-4-ci-builds:with-docker
189
+ - image : velo/toolchains-4-ci-builds:latest
168
190
steps :
169
191
- checkout
170
192
- run :
@@ -189,7 +211,7 @@ jobs:
189
211
<< : *defaults
190
212
working_directory : ~/querydsl
191
213
docker :
192
- - image : velo/toolchains-4-ci-builds:with-21
214
+ - image : velo/toolchains-4-ci-builds:latest
193
215
- image : mysql:5.6.38
194
216
environment :
195
217
- MYSQL_ROOT_PASSWORD=querydsl
@@ -201,17 +223,16 @@ jobs:
201
223
- restore_cache :
202
224
keys :
203
225
- querydsl-dependencies-{{ checksum "pom.xml" }}
204
- - querydsl-dependencies-
205
226
- run :
206
227
name : ' Test'
207
228
command : |
208
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.MySQL
229
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.MySQL
209
230
- save-test-results
210
231
testPostgreSQL :
211
232
<< : *defaults
212
233
working_directory : ~/querydsl
213
234
docker :
214
- - image : velo/toolchains-4-ci-builds:with-21
235
+ - image : velo/toolchains-4-ci-builds:latest
215
236
- image : postgis/postgis:16-3.4-alpine
216
237
environment :
217
238
- POSTGRES_USER=querydsl
@@ -222,17 +243,16 @@ jobs:
222
243
- restore_cache :
223
244
keys :
224
245
- querydsl-dependencies-{{ checksum "pom.xml" }}
225
- - querydsl-dependencies-
226
246
- run :
227
247
name : ' Test'
228
248
command : |
229
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.PostgreSQL
249
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.PostgreSQL
230
250
- save-test-results
231
251
testCUBRID :
232
252
<< : *defaults
233
253
working_directory : ~/querydsl
234
254
docker :
235
- - image : velo/toolchains-4-ci-builds:with-21
255
+ - image : velo/toolchains-4-ci-builds:latest
236
256
- image : cubrid/cubrid:11.3
237
257
environment :
238
258
- CUBRID_DB=demodb
@@ -241,17 +261,16 @@ jobs:
241
261
- restore_cache :
242
262
keys :
243
263
- querydsl-dependencies-{{ checksum "pom.xml" }}
244
- - querydsl-dependencies-
245
264
- run :
246
265
name : ' Test'
247
266
command : |
248
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.CUBRID
267
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.CUBRID
249
268
- save-test-results
250
269
testOracle :
251
270
<< : *defaults
252
271
working_directory : ~/querydsl
253
272
docker :
254
- - image : velo/toolchains-4-ci-builds:with-21
273
+ - image : velo/toolchains-4-ci-builds:latest
255
274
- image : gvenzl/oracle-xe:slim-faststart
256
275
environment :
257
276
- ORACLE_PASSWORD=querydsl
@@ -263,34 +282,32 @@ jobs:
263
282
- restore_cache :
264
283
keys :
265
284
- querydsl-dependencies-{{ checksum "pom.xml" }}
266
- - querydsl-dependencies-
267
285
- run :
268
286
name : ' Test'
269
287
command : |
270
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.Oracle
288
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.Oracle
271
289
- save-test-results
272
290
testMongo :
273
291
<< : *defaults
274
292
working_directory : ~/querydsl
275
293
docker :
276
- - image : velo/toolchains-4-ci-builds:with-21
294
+ - image : velo/toolchains-4-ci-builds:latest
277
295
- image : mongo:3.6.1
278
296
steps :
279
297
- checkout
280
298
- restore_cache :
281
299
keys :
282
300
- querydsl-dependencies-{{ checksum "pom.xml" }}
283
- - querydsl-dependencies-
284
301
- run :
285
302
name : ' Test'
286
303
command : |
287
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.MongoDB
304
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.MongoDB
288
305
- save-test-results
289
306
testFirebird :
290
307
<< : *defaults
291
308
working_directory : ~/querydsl
292
309
docker :
293
- - image : velo/toolchains-4-ci-builds:with-21
310
+ - image : velo/toolchains-4-ci-builds:latest
294
311
- image : jacobalberty/firebird:2.5.9-ss
295
312
environment :
296
313
- ISC_PASSWORD=masterkey
@@ -303,27 +320,75 @@ jobs:
303
320
- restore_cache :
304
321
keys :
305
322
- querydsl-dependencies-{{ checksum "pom.xml" }}
306
- - querydsl-dependencies-
307
323
- run :
308
324
name : ' Test'
309
325
command : |
310
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.Firebird
326
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.Firebird
311
327
- save-test-results
312
328
testEmbedded :
313
329
<< : *defaults
314
330
working_directory : ~/querydsl
315
331
docker :
316
- - image : velo/toolchains-4-ci-builds:with-21
332
+ - image : velo/toolchains-4-ci-builds:latest
317
333
steps :
318
334
- checkout
319
335
- restore_cache :
320
336
keys :
321
337
- querydsl-dependencies-{{ checksum "pom.xml" }}
322
- - querydsl-dependencies-
323
338
- run :
324
339
name : ' Test'
325
340
command : |
326
- ./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.EmbeddedDatabase
341
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.EmbeddedDatabase
342
+ - save-test-results
343
+ testDB2 :
344
+ # Use the machine executor so we have full VM capabilities (e.g. docker running as admin)
345
+ machine : true
346
+ working_directory : ~/querydsl
347
+ environment :
348
+ # You can also set any DB2-specific environment variables here if needed
349
+ DB2INST1_PASSWORD : a3sd!fDj
350
+ steps :
351
+ - checkout
352
+ - restore_cache :
353
+ keys :
354
+ - querydsl-dependencies-{{ checksum "pom.xml" }}
355
+ # Start the DB2 container in detached mode
356
+ - run :
357
+ name : " Start DB2 container"
358
+ command : |
359
+ # Start the DB2 container with the same settings as your docker-compose file
360
+ docker run -d --privileged --name db2 \
361
+ -p 50000:50000 \
362
+ -e DB2INST1_PASSWORD=a3sd!fDj \
363
+ -e DB2INSTANCE=db2inst1 \
364
+ -e DBNAME=sample \
365
+ -e LICENSE=accept \
366
+ -e ARCHIVE_LOGS=false \
367
+ -e AUTOCONFIG=false \
368
+ ibmcom/db2:11.5.0.0
369
+
370
+ echo "Waiting for DB2 to initialize..."
371
+ # Basic health-check loop; replace with a more robust check if available
372
+ for i in {1..60}; do
373
+ if docker logs db2 2>&1 | grep -q "All databases are now active"; then
374
+ echo "DB2 appears to be up"
375
+ break
376
+ fi
377
+ echo "Waiting ($i/60)..."
378
+ sleep 10
379
+ done
380
+ docker ps
381
+
382
+ # Run your tests against DB2; adjust the Maven command according to your project
383
+ - run :
384
+ name : " Run DB2 tests"
385
+ command : |
386
+ ./mvnw -ntp -B install -Pci -Dgroups=com.querydsl.core.testutil.DB2 -Dtoolchain.skip=true
387
+ # Clean up the DB2 container once the tests are done
388
+ - run :
389
+ name : " Stop and remove DB2 container"
390
+ command : |
391
+ docker stop db2 && docker rm db2
327
392
- save-test-results
328
393
329
394
deploySnapshot :
@@ -335,7 +400,6 @@ jobs:
335
400
- restore_cache :
336
401
keys :
337
402
- querydsl-dependencies-{{ checksum "pom.xml" }}
338
- - querydsl-dependencies-
339
403
- resolve-dependencies
340
404
- configure-gpg
341
405
- run :
@@ -352,7 +416,6 @@ jobs:
352
416
- restore_cache :
353
417
keys :
354
418
- querydsl-dependencies-{{ checksum "pom.xml" }}
355
- - querydsl-dependencies-
356
419
- resolve-dependencies
357
420
- configure-gpg
358
421
- run :
@@ -436,6 +499,12 @@ workflows:
436
499
- ' Resolve dependencies'
437
500
filters :
438
501
<< : *all-branches
502
+ - testDB2 :
503
+ name : ' Test DB2'
504
+ requires :
505
+ - ' Resolve dependencies'
506
+ filters :
507
+ << : *all-branches
439
508
440
509
snapshot :
441
510
jobs :
0 commit comments