Skip to content

Commit 4415845

Browse files
committed
test(ci): add indy matrix to functional test CI jobs
Add indy: [false, true] matrix dimension to all functional test CI jobs (functional, hibernate5, mongodb, forge) to ensure Groovy invokedynamic is tested both enabled and disabled. After PR #15375 moved indy configuration from generated build.gradle files to the Grails Gradle Plugin, CI was only testing with the default (indy=false). This leaves indy=true completely untested. Changes: - Add grailsIndy property toggle to grails-extension-gradle-config.gradle so test example projects respect -PgrailsIndy=true/false - Add indy matrix to functional, hibernate5Functional, mongodbFunctional, and buildForge CI jobs - Include indy status in job names for clear CI dashboard visibility Assisted-by: Claude Code <Claude@Claude.ai>
1 parent d1db8ab commit 4415845

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.github/workflows/gradle.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,12 @@ jobs:
136136
-PonlyCoreTests
137137
-PskipCodeStyle
138138
buildForge:
139-
name: "Build Grails Forge"
139+
name: "Build Grails Forge (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
140140
strategy:
141141
fail-fast: false
142142
matrix:
143143
java: [ 17, 21 ]
144+
indy: [ false, true ]
144145
runs-on: ubuntu-24.04
145146
steps:
146147
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
@@ -163,6 +164,7 @@ jobs:
163164
./gradlew build
164165
--continue
165166
--stacktrace
167+
-PgrailsIndy=${{ matrix.indy }}
166168
-PskipCodeStyle
167169
-PskipTests
168170
- name: "🔨 Build project with tests"
@@ -173,6 +175,7 @@ jobs:
173175
--continue
174176
--rerun-tasks
175177
--stacktrace
178+
-PgrailsIndy=${{ matrix.indy }}
176179
-PskipCodeStyle
177180
- name: "✅ Verify combined CLI"
178181
run: |
@@ -183,20 +186,21 @@ jobs:
183186
./tmp1/cli/bin/grails --version
184187
./tmp1/cli/bin/grails-forge-cli --version
185188
- name: "📤 Upload CLI Zip to Workflow Summary Page"
186-
if: ${{ matrix.java == '17' }}
189+
if: ${{ matrix.java == '17' && matrix.indy == false }}
187190
uses: actions/upload-artifact@v6
188191
with:
189192
name: 'apache-grails-SNAPSHOT-bin.zip'
190193
include-hidden-files: true
191194
path: grails-forge/tmp1/cli/**/*
192195
if-no-files-found: 'error'
193196
functional:
194-
name: "Functional Tests"
197+
name: "Functional Tests (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
195198
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
196199
strategy:
197200
fail-fast: false
198201
matrix:
199202
java: [ 17, 21, 25 ]
203+
indy: [ false, true ]
200204
runs-on: ubuntu-24.04
201205
steps:
202206
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
@@ -219,19 +223,21 @@ jobs:
219223
--rerun-tasks
220224
--stacktrace
221225
-PgebAtCheckWaiting
226+
-PgrailsIndy=${{ matrix.indy }}
222227
-PonlyFunctionalTests
223228
-PskipCodeStyle
224229
-PskipHibernate5Tests
225230
-PskipMongodbTests
226231
mongodbFunctional:
227232
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
228-
name: "Mongodb Functional Tests"
233+
name: "Mongodb Functional Tests (Java ${{ matrix.java }}, MongoDB ${{ matrix.mongodb-version }}, indy=${{ matrix.indy }})"
229234
runs-on: ubuntu-24.04
230235
strategy:
231236
fail-fast: false
232237
matrix:
233238
java: [ 17, 25 ]
234239
mongodb-version: [ '7.0', '8.0' ] # test with supported versions https://www.mongodb.com/legal/support-policy/lifecycles
240+
indy: [ false, true ]
235241
steps:
236242
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
237243
run: curl -s https://api.ipify.org
@@ -254,17 +260,19 @@ jobs:
254260
--continue
255261
--rerun-tasks
256262
--stacktrace
263+
-PgrailsIndy=${{ matrix.indy }}
257264
-PonlyMongodbTests
258265
-PmongodbContainerVersion=${{ matrix.mongodb-version }}
259266
-PskipCodeStyle
260267
hibernate5Functional:
261268
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
262-
name: "Hibernate5 Functional Tests"
269+
name: "Hibernate5 Functional Tests (Java ${{ matrix.java }}, indy=${{ matrix.indy }})"
263270
runs-on: ubuntu-24.04
264271
strategy:
265272
fail-fast: false
266273
matrix:
267274
java: [ 17, 25 ]
275+
indy: [ false, true ]
268276
steps:
269277
- name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
270278
run: curl -s https://api.ipify.org
@@ -287,6 +295,7 @@ jobs:
287295
--continue
288296
--rerun-tasks
289297
--stacktrace
298+
-PgrailsIndy=${{ matrix.indy }}
290299
-PonlyHibernate5Tests
291300
-PskipCodeStyle
292301
publishGradle:

gradle/grails-extension-gradle-config.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,11 @@ grails {
3131
// this means you MUST publish locally via ./gradlew :grails-bom:publishMavenPublicationToLocalBomRepository
3232
// this causes unexpected version mismatches in the various plugin projects
3333
springDependencyManagement = false
34+
35+
// Allow CI to toggle Groovy invokedynamic (indy) via -PgrailsIndy=true
36+
// This enables testing functional tests with both indy enabled and disabled.
37+
// See: https://github.com/apache/grails-core/issues/15321
38+
if (project.hasProperty('grailsIndy')) {
39+
indy = Boolean.parseBoolean(project.property('grailsIndy') as String)
40+
}
3441
}

0 commit comments

Comments
 (0)