77 branches : [ "main" ]
88
99jobs :
10- build :
10+ # Build and test with Java 21 (all modules)
11+ build-java21 :
12+ name : Build & Test (Java 21 - All Modules)
1113 runs-on : ubuntu-latest
1214
1315 services :
@@ -61,10 +63,10 @@ jobs:
6163 steps :
6264 - uses : actions/checkout@v4
6365
64- - name : Set up JDK
66+ - name : Set up JDK 21
6567 uses : actions/setup-java@v4
6668 with :
67- java-version : " 21 "
69+ java-version : ' 21 '
6870 distribution : temurin
6971 cache : maven
7072
@@ -88,6 +90,167 @@ jobs:
8890 uses : actions/upload-artifact@v4
8991 if : always()
9092 with :
91- name : test-results
93+ name : test-results-java21
9294 path : ' **/target/surefire-reports/*.xml'
9395
96+ # Build and test Spring Boot 2.x modules with Java 11
97+ build-java11 :
98+ name : Build & Test (Java 11 - Spring Boot 2.x)
99+ runs-on : ubuntu-latest
100+
101+ services :
102+ mongo :
103+ image : mongo:7.0
104+ env :
105+ MONGO_INITDB_ROOT_USERNAME : fluxgate
106+ MONGO_INITDB_ROOT_PASSWORD : fluxgate123
107+ MONGO_INITDB_DATABASE : fluxgate
108+ ports :
109+ - 27017:27017
110+ options : >-
111+ --health-cmd "mongosh --username fluxgate --password fluxgate123 --authenticationDatabase admin --eval 'db.adminCommand(\"ping\")'"
112+ --health-interval=10s
113+ --health-timeout=5s
114+ --health-retries=5
115+
116+ redis :
117+ image : redis:7-alpine
118+ ports :
119+ - 6379:6379
120+ options : >-
121+ --health-cmd "redis-cli ping"
122+ --health-interval=10s
123+ --health-timeout=5s
124+ --health-retries=5
125+
126+ redis-cluster :
127+ image : grokzen/redis-cluster:7.0.10
128+ env :
129+ IP : " 0.0.0.0"
130+ INITIAL_PORT : 7100
131+ ports :
132+ - 7100:7100
133+ - 7101:7101
134+ - 7102:7102
135+ - 7103:7103
136+ - 7104:7104
137+ - 7105:7105
138+ options : >-
139+ --health-cmd "redis-cli -p 7100 cluster info | grep cluster_state:ok"
140+ --health-interval=10s
141+ --health-timeout=10s
142+ --health-retries=10
143+
144+ env :
145+ FLUXGATE_MONGO_URI : " mongodb://fluxgate:fluxgate123@localhost:27017/fluxgate?authSource=admin"
146+ FLUXGATE_MONGO_DB : " fluxgate"
147+ FLUXGATE_REDIS_URI : " redis://localhost:6379"
148+
149+ steps :
150+ - uses : actions/checkout@v4
151+
152+ - name : Set up JDK 11
153+ uses : actions/setup-java@v4
154+ with :
155+ java-version : ' 11'
156+ distribution : temurin
157+ cache : maven
158+
159+ - name : Build core modules with Java 11
160+ run : |
161+ # Build only Java 11 compatible modules
162+ mvn -B install -DskipTests \
163+ -pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot2-starter \
164+ -am
165+
166+ - name : Test Spring Boot 2.x starter with Java 11
167+ run : |
168+ mvn -B verify \
169+ -pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot2-starter
170+
171+ - name : Upload test results
172+ uses : actions/upload-artifact@v4
173+ if : always()
174+ with :
175+ name : test-results-java11
176+ path : ' **/target/surefire-reports/*.xml'
177+
178+ # Build and test with Java 17 (Spring Boot 3.x minimum)
179+ build-java17 :
180+ name : Build & Test (Java 17 - Spring Boot 3.x)
181+ runs-on : ubuntu-latest
182+
183+ services :
184+ mongo :
185+ image : mongo:7.0
186+ env :
187+ MONGO_INITDB_ROOT_USERNAME : fluxgate
188+ MONGO_INITDB_ROOT_PASSWORD : fluxgate123
189+ MONGO_INITDB_DATABASE : fluxgate
190+ ports :
191+ - 27017:27017
192+ options : >-
193+ --health-cmd "mongosh --username fluxgate --password fluxgate123 --authenticationDatabase admin --eval 'db.adminCommand(\"ping\")'"
194+ --health-interval=10s
195+ --health-timeout=5s
196+ --health-retries=5
197+
198+ redis :
199+ image : redis:7-alpine
200+ ports :
201+ - 6379:6379
202+ options : >-
203+ --health-cmd "redis-cli ping"
204+ --health-interval=10s
205+ --health-timeout=5s
206+ --health-retries=5
207+
208+ redis-cluster :
209+ image : grokzen/redis-cluster:7.0.10
210+ env :
211+ IP : " 0.0.0.0"
212+ INITIAL_PORT : 7100
213+ ports :
214+ - 7100:7100
215+ - 7101:7101
216+ - 7102:7102
217+ - 7103:7103
218+ - 7104:7104
219+ - 7105:7105
220+ options : >-
221+ --health-cmd "redis-cli -p 7100 cluster info | grep cluster_state:ok"
222+ --health-interval=10s
223+ --health-timeout=10s
224+ --health-retries=10
225+
226+ env :
227+ FLUXGATE_MONGO_URI : " mongodb://fluxgate:fluxgate123@localhost:27017/fluxgate?authSource=admin"
228+ FLUXGATE_MONGO_DB : " fluxgate"
229+ FLUXGATE_REDIS_URI : " redis://localhost:6379"
230+
231+ steps :
232+ - uses : actions/checkout@v4
233+
234+ - name : Set up JDK 17
235+ uses : actions/setup-java@v4
236+ with :
237+ java-version : ' 17'
238+ distribution : temurin
239+ cache : maven
240+
241+ - name : Build all modules with Java 17 (excluding Java 21 samples)
242+ run : |
243+ mvn -B install -DskipTests \
244+ -pl !fluxgate-samples/fluxgate-sample-standalone-java21
245+
246+ - name : Test Spring Boot 3.x starter with Java 17
247+ run : |
248+ mvn -B verify \
249+ -pl fluxgate-core,fluxgate-mongo-adapter,fluxgate-redis-ratelimiter,fluxgate-spring-boot3-starter
250+
251+ - name : Upload test results
252+ uses : actions/upload-artifact@v4
253+ if : always()
254+ with :
255+ name : test-results-java17
256+ path : ' **/target/surefire-reports/*.xml'
0 commit comments