1616executors :
1717 java :
1818 docker :
19- - image : velo/toolchains-4-ci-builds:with-21
19+ - image : velo/toolchains-4-ci-builds:latest
2020
2121# common commands
2222commands :
@@ -38,6 +38,32 @@ commands:
3838 when : always
3939 - store_test_results :
4040 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
4167
4268 configure-gpg :
4369 steps :
@@ -80,13 +106,12 @@ jobs:
80106 << : *defaults
81107 working_directory : ~/querydsl
82108 docker :
83- - image : velo/toolchains-4-ci-builds:with-21
109+ - image : velo/toolchains-4-ci-builds:latest
84110 steps :
85111 - checkout
86112 - restore_cache :
87113 keys :
88114 - querydsl-dependencies-{{ checksum "pom.xml" }}
89- - querydsl-dependencies-
90115 - resolve-dependencies
91116 - save_cache :
92117 paths :
@@ -96,13 +121,12 @@ jobs:
96121 << : *defaults
97122 working_directory : ~/querydsl
98123 docker :
99- - image : velo/toolchains-4-ci-builds:with-21
124+ - image : velo/toolchains-4-ci-builds:latest
100125 steps :
101126 - checkout
102127 - restore_cache :
103128 keys :
104129 - querydsl-dependencies-{{ checksum "pom.xml" }}
105- - querydsl-dependencies-
106130 - run :
107131 name : ' Test'
108132 command : |
@@ -119,7 +143,6 @@ jobs:
119143 - restore_cache :
120144 keys :
121145 - querydsl-dependencies-{{ checksum "pom.xml" }}
122- - querydsl-dependencies-
123146 - run :
124147 name : ' Test'
125148 command : |
@@ -130,21 +153,20 @@ jobs:
130153 << : *defaults
131154 working_directory : ~/querydsl
132155 docker :
133- - image : velo/toolchains-4-ci-builds:with-docker
156+ - image : velo/toolchains-4-ci-builds:latest
134157 steps :
135158 - checkout
136159 - restore_cache :
137160 keys :
138161 - querydsl-dependencies-{{ checksum "pom.xml" }}
139- - querydsl-dependencies-
140162 - run :
141163 name : ' Prepare environment'
142164 command : |
143165 ./mvnw -ntp -B install -Pquickbuild -pl :querydsl-sql-spring,:querydsl-jpa-spring,:querydsl-kotlin-codegen,:querydsl-mongodb,:querydsl-r2dbc,:querydsl-sql-json -am -T2
144166 - run :
145167 name : ' Build and test examples'
146168 command : |
147- ./mvnw -ntp -B verify -Pexamples -rf :querydsl-examples
169+ ./mvnw -ntp -B install -Pexamples -rf :querydsl-examples
148170 - save-test-results
149171 buildQuarkusExample :
150172 << : *defaults
@@ -164,7 +186,7 @@ jobs:
164186 << : *defaults
165187 working_directory : ~/querydsl
166188 docker :
167- - image : velo/toolchains-4-ci-builds:with-docker
189+ - image : velo/toolchains-4-ci-builds:latest
168190 steps :
169191 - checkout
170192 - run :
@@ -189,7 +211,7 @@ jobs:
189211 << : *defaults
190212 working_directory : ~/querydsl
191213 docker :
192- - image : velo/toolchains-4-ci-builds:with-21
214+ - image : velo/toolchains-4-ci-builds:latest
193215 - image : mysql:5.6.38
194216 environment :
195217 - MYSQL_ROOT_PASSWORD=querydsl
@@ -201,17 +223,16 @@ jobs:
201223 - restore_cache :
202224 keys :
203225 - querydsl-dependencies-{{ checksum "pom.xml" }}
204- - querydsl-dependencies-
205226 - run :
206227 name : ' Test'
207228 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
209230 - save-test-results
210231 testPostgreSQL :
211232 << : *defaults
212233 working_directory : ~/querydsl
213234 docker :
214- - image : velo/toolchains-4-ci-builds:with-21
235+ - image : velo/toolchains-4-ci-builds:latest
215236 - image : postgis/postgis:16-3.4-alpine
216237 environment :
217238 - POSTGRES_USER=querydsl
@@ -222,17 +243,16 @@ jobs:
222243 - restore_cache :
223244 keys :
224245 - querydsl-dependencies-{{ checksum "pom.xml" }}
225- - querydsl-dependencies-
226246 - run :
227247 name : ' Test'
228248 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
230250 - save-test-results
231251 testCUBRID :
232252 << : *defaults
233253 working_directory : ~/querydsl
234254 docker :
235- - image : velo/toolchains-4-ci-builds:with-21
255+ - image : velo/toolchains-4-ci-builds:latest
236256 - image : cubrid/cubrid:11.3
237257 environment :
238258 - CUBRID_DB=demodb
@@ -241,17 +261,16 @@ jobs:
241261 - restore_cache :
242262 keys :
243263 - querydsl-dependencies-{{ checksum "pom.xml" }}
244- - querydsl-dependencies-
245264 - run :
246265 name : ' Test'
247266 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
249268 - save-test-results
250269 testOracle :
251270 << : *defaults
252271 working_directory : ~/querydsl
253272 docker :
254- - image : velo/toolchains-4-ci-builds:with-21
273+ - image : velo/toolchains-4-ci-builds:latest
255274 - image : gvenzl/oracle-xe:slim-faststart
256275 environment :
257276 - ORACLE_PASSWORD=querydsl
@@ -263,34 +282,32 @@ jobs:
263282 - restore_cache :
264283 keys :
265284 - querydsl-dependencies-{{ checksum "pom.xml" }}
266- - querydsl-dependencies-
267285 - run :
268286 name : ' Test'
269287 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
271289 - save-test-results
272290 testMongo :
273291 << : *defaults
274292 working_directory : ~/querydsl
275293 docker :
276- - image : velo/toolchains-4-ci-builds:with-21
294+ - image : velo/toolchains-4-ci-builds:latest
277295 - image : mongo:3.6.1
278296 steps :
279297 - checkout
280298 - restore_cache :
281299 keys :
282300 - querydsl-dependencies-{{ checksum "pom.xml" }}
283- - querydsl-dependencies-
284301 - run :
285302 name : ' Test'
286303 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
288305 - save-test-results
289306 testFirebird :
290307 << : *defaults
291308 working_directory : ~/querydsl
292309 docker :
293- - image : velo/toolchains-4-ci-builds:with-21
310+ - image : velo/toolchains-4-ci-builds:latest
294311 - image : jacobalberty/firebird:2.5.9-ss
295312 environment :
296313 - ISC_PASSWORD=masterkey
@@ -303,27 +320,75 @@ jobs:
303320 - restore_cache :
304321 keys :
305322 - querydsl-dependencies-{{ checksum "pom.xml" }}
306- - querydsl-dependencies-
307323 - run :
308324 name : ' Test'
309325 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
311327 - save-test-results
312328 testEmbedded :
313329 << : *defaults
314330 working_directory : ~/querydsl
315331 docker :
316- - image : velo/toolchains-4-ci-builds:with-21
332+ - image : velo/toolchains-4-ci-builds:latest
317333 steps :
318334 - checkout
319335 - restore_cache :
320336 keys :
321337 - querydsl-dependencies-{{ checksum "pom.xml" }}
322- - querydsl-dependencies-
323338 - run :
324339 name : ' Test'
325340 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
327392 - save-test-results
328393
329394 deploySnapshot :
@@ -335,7 +400,6 @@ jobs:
335400 - restore_cache :
336401 keys :
337402 - querydsl-dependencies-{{ checksum "pom.xml" }}
338- - querydsl-dependencies-
339403 - resolve-dependencies
340404 - configure-gpg
341405 - run :
@@ -352,7 +416,6 @@ jobs:
352416 - restore_cache :
353417 keys :
354418 - querydsl-dependencies-{{ checksum "pom.xml" }}
355- - querydsl-dependencies-
356419 - resolve-dependencies
357420 - configure-gpg
358421 - run :
@@ -436,6 +499,12 @@ workflows:
436499 - ' Resolve dependencies'
437500 filters :
438501 << : *all-branches
502+ - testDB2 :
503+ name : ' Test DB2'
504+ requires :
505+ - ' Resolve dependencies'
506+ filters :
507+ << : *all-branches
439508
440509 snapshot :
441510 jobs :
0 commit comments