Skip to content

Commit 8bca6ae

Browse files
github-actions[bot]dependabot[bot]veloCole-SJ
authored
Sync master into querydsl-7.0 (#1096)
* Bump io.projectreactor:reactor-bom from 2024.0.4 to 2024.0.5 Bumps [io.projectreactor:reactor-bom](https://github.com/reactor/reactor) from 2024.0.4 to 2024.0.5. - [Release notes](https://github.com/reactor/reactor/releases) - [Commits](reactor/reactor@2024.0.4...2024.0.5) --- updated-dependencies: - dependency-name: io.projectreactor:reactor-bom dependency-version: 2024.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump quarkus.version from 3.21.2 to 3.21.3 Bumps `quarkus.version` from 3.21.2 to 3.21.3. Updates `io.quarkus.platform:quarkus-bom` from 3.21.2 to 3.21.3 - [Commits](quarkusio/quarkus-platform@3.21.2...3.21.3) Updates `io.quarkus.platform:quarkus-maven-plugin` from 3.21.2 to 3.21.3 - [Commits](quarkusio/quarkus-platform@3.21.2...3.21.3) --- updated-dependencies: - dependency-name: io.quarkus.platform:quarkus-bom dependency-version: 3.21.3 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus.platform:quarkus-maven-plugin dependency-version: 3.21.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Enable easy-jacoco for project (#1091) * Enable easy-jacoco for project Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Upload coverage reports Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Upload codecov on windows * Using newer image with codecov support Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Enable missing db2 testing Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Setup codecov to upload project wide coverage report Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Give db2 more time to start Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Setup codecov to upload project wide coverage report Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Remove codecov orb Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Reports are only generated at verify phase, need change build Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Download latest version of codecov Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Add badges Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Include new package on coverage reports Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Use internal @generated annotations Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Fix kotlin-codegen build Signed-off-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com> * feat(@QueryProjection): support builder-based Q class generation (#1078) * feature: add builder properties in QueryProjection annotation * feature: add builder properties in Constructor class * feature: add public static inner class write methods * feature: add QueryProjection Builder feature on annotation processor * feature: add inner builder class and factory method to generated QClass * test: add QueryProjectionBuilderTestEntity for test * feature, test: add QueryProjectionBuilderTestEntity for GenericExporter * question: how can i resolve binary incompatible change without this commit * feature: add duplicate builder name check in TypeElementHandler * docs: update javadoc for QueryProjection * feature: enhance builder name validation in TypeElementHandler * test: add unit tests for QueryProjectionBuilder * Skip API validation on tooling projects Signed-off-by: Marvin Froeder <velo.br@gmail.com> * modify: remove inner class, methods binary compatibility validation bypass option --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Marvin <velo@users.noreply.github.com> Co-authored-by: Cole-SJ <91147303+Cole-SJ@users.noreply.github.com> Co-authored-by: Marvin Froeder <velo.br@gmail.com>
1 parent ed298a3 commit 8bca6ae

File tree

22 files changed

+512
-106
lines changed

22 files changed

+512
-106
lines changed

.circleci/config.yml

Lines changed: 102 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
executors:
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
2222
commands:
@@ -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:

.mvn/extensions.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2012-2024 The Feign Authors
5+
6+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
7+
in compliance with the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software distributed under the License
12+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13+
or implied. See the License for the specific language governing permissions and limitations under
14+
the License.
15+
16+
-->
17+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
19+
<extension>
20+
<groupId>com.marvinformatics.jacoco</groupId>
21+
<artifactId>easy-jacoco-maven-plugin</artifactId>
22+
<version>0.1.3</version>
23+
</extension>
24+
</extensions>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/OpenFeign/querydsl/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/OpenFeign/querydsl/tree/master) [![codecov](https://codecov.io/gh/OpenFeign/querydsl/graph/badge.svg?token=6yJhkzBRmx)](https://codecov.io/gh/OpenFeign/querydsl) ![Maven Central Version](https://img.shields.io/maven-central/v/io.github.openfeign.querydsl/querydsl-core)
2+
13
## Querydsl
24

35
Querydsl is a framework which enables the construction of type-safe SQL-like queries for multiple backends including JPA, MongoDB and SQL in Java.

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "2.4"
21
services:
32
# Provides an easy way to ensure slow-starting databases are ready when the tests run
43
block-until-healthy:

0 commit comments

Comments
 (0)