Skip to content

Commit c6a022c

Browse files
authored
Merge pull request #2081 from matrei/fix-ci-mongo
Turn on functional tests with new Apache coordinates
2 parents 5d2b438 + 3e79e64 commit c6a022c

File tree

41 files changed

+261
-450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+261
-450
lines changed

.github/workflows/gradle.yml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ permissions:
1111
packages: read
1212
jobs:
1313
datastore-build:
14-
if: false # remove after publishing
1514
name: "Build Datastore Project"
1615
runs-on: ubuntu-24.04
1716
strategy:
@@ -35,38 +34,42 @@ jobs:
3534
env:
3635
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
3736
run: ./gradlew cleanTest build --continue -PonlyDatastoreTests
38-
# mongodb-build:
39-
# if: false # TODO: Remove once we can run mongo
40-
# name: "Build Mongodb Project"
41-
# runs-on: ubuntu-24.04
42-
# strategy:
43-
# fail-fast: false
44-
# matrix:
45-
# java: [ 17, 21 ]
46-
# mongodb-version: [ '4', '5', '6', '7', '8' ]
47-
# steps:
48-
# - name: "📥 Checkout the repository"
49-
# uses: actions/checkout@v4
50-
# - name: "☕️ Setup JDK"
51-
# uses: actions/setup-java@v4
52-
# with:
53-
# java-version: ${{ matrix.java }}
54-
# distribution: liberica
55-
# - name: "🐘 Setup Gradle"
56-
# uses: gradle/actions/setup-gradle@v4
57-
# with:
58-
# develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
59-
# - name: "▶️ Start MongoDB (needed for some tests)"
60-
# uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action)
61-
# with:
62-
# mongodb-version: ${{ matrix.mongodb-version }}
63-
# - name: "🔨 Run Build"
64-
# id: build
65-
# env:
66-
# GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
67-
# run: ./gradlew cleanTest build --continue -PonlyMongodbTests
37+
mongodb-build:
38+
name: "Build Mongodb Project"
39+
runs-on: ubuntu-24.04
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
java: [ 17, 21 ]
44+
mongodb-version: [ '5', '6', '7', '8' ]
45+
services:
46+
mongodb:
47+
image: mongo:${{ matrix.mongodb-version }}
48+
ports:
49+
- 27017:27017
50+
options: >-
51+
--health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'"
52+
--health-interval 10s
53+
--health-timeout 5s
54+
--health-retries 5
55+
steps:
56+
- name: "📥 Checkout the repository"
57+
uses: actions/checkout@v4
58+
- name: "☕️ Setup JDK"
59+
uses: actions/setup-java@v4
60+
with:
61+
java-version: ${{ matrix.java }}
62+
distribution: liberica
63+
- name: "🐘 Setup Gradle"
64+
uses: gradle/actions/setup-gradle@v4
65+
with:
66+
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
67+
- name: "🔨 Run Build"
68+
id: build
69+
env:
70+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
71+
run: ./gradlew cleanTest build --continue -PonlyMongodbTests
6872
hibernate5-build:
69-
if: false # TODO: Remove after publishing to core
7073
name: "Build Hibernate5 Project"
7174
runs-on: ubuntu-24.04
7275
strategy:
@@ -93,7 +96,7 @@ jobs:
9396
publish:
9497
if: github.event_name == 'push'
9598
name: "Publish Snapshot"
96-
#needs: [datastore-build, hibernate5-build, mongodb-build] # Fix once mongo db action is added
99+
needs: [datastore-build, hibernate5-build, mongodb-build]
97100
runs-on: ubuntu-24.04
98101
steps:
99102
- name: "📥 Checkout the repository"
@@ -107,10 +110,10 @@ jobs:
107110
uses: gradle/actions/setup-gradle@v4
108111
with:
109112
develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }}
110-
- name: "📤 Publish Snapshot to repo.grails.org"
113+
- name: "📤 Publish Snapshot artifacts"
111114
env:
112115
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
113-
GRADLE_PUBLISH_RELEASE: 'false'
116+
GRAILS_PUBLISH_RELEASE: 'false'
114117
MAVEN_PUBLISH_URL: ${{ secrets.GRAILS_NEXUS_PUBLISH_SNAPSHOT_URL }}
115118
MAVEN_PUBLISH_USERNAME: ${{ secrets.NEXUS_USER }}
116119
MAVEN_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PW }}

.github/workflows/groovy-joint-workflow.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ jobs:
108108
name: "Build Project"
109109
needs: build_groovy
110110
runs-on: ubuntu-latest
111+
services:
112+
mongodb:
113+
image: mongo:8
114+
ports:
115+
- 27017:27017
116+
options: >-
117+
--health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'"
118+
--health-interval 10s
119+
--health-timeout 5s
120+
--health-retries 5
111121
steps:
112122
- name: "📥 Checkout project"
113123
uses: actions/checkout@v4
@@ -127,10 +137,6 @@ jobs:
127137
key: cache-local-maven-${{ github.sha }}
128138
- name: "🪶 Add mavenLocal repository to build"
129139
run: sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' build.gradle
130-
- name: "▶️ Start MongoDB (needed for some tests)"
131-
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action)
132-
with:
133-
mongodb-version: '8'
134140
- name: "🔨 Build and test the project using the locally built Groovy snapshot"
135141
env:
136142
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

gradle/example-config.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
tasks.withType(Groovydoc).configureEach {
22
enabled = false
3+
}
4+
5+
tasks.matching { 'bootJar' == it.name }.configureEach {
6+
// Workaround for:
7+
// Execution failed for task ':core-examples-functional-test-app:bootJar'.
8+
// > Entry BOOT-INF/lib/grails-web-databinding-7.0.0-SNAPSHOT.jar is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.12.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
9+
enabled = false
10+
}
11+
12+
tasks.matching { 'assetCompile' == it.name }.configureEach {
13+
// Workaround for: https://github.com/bertramdev/asset-pipeline/issues/177
14+
// Execution failed for task ':cas-examples-spring-security-cas-test1:assetCompile'.
15+
// > java.util.ConcurrentModificationException (no error message)
16+
outputs.dir rootProject.layout.buildDirectory.dir('asset-serialize')
317
}

grails-data-graphql/core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
api "com.graphql-java:graphql-java:$graphqlJavaVersion"
1212
api "com.graphql-java:graphql-java-extended-scalars:$graphqlJavaScalarExtVersion"
1313
api 'com.github.javaparser:javaparser-core:3.25.7'
14-
api 'org.grails.plugins:views-json:2.3.2'
14+
api 'org.apache.grails:grails-views-gson:2.3.2'
1515
api 'org.javassist:javassist:3.29.2-GA'
1616

1717
codenarc "org.codenarc:CodeNarc:$codenarcVersion"

grails-data-graphql/examples/grails-docs-app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
dependencies {
22
implementation "org.springframework.boot:spring-boot-starter-logging"
33
implementation "org.springframework.boot:spring-boot-autoconfigure"
4-
implementation "org.apache.grails:grails-core", {
5-
exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated
6-
}
4+
implementation "org.apache.grails:grails-core"
75
implementation "org.springframework.boot:spring-boot-starter-actuator"
86
implementation "org.springframework.boot:spring-boot-starter-tomcat"
97
implementation "org.apache.grails:grails-url-mappings"
@@ -15,21 +13,21 @@ dependencies {
1513
implementation "org.apache.grails:grails-databinding"
1614
implementation "org.apache.grails.web:grails-web-boot"
1715
implementation "org.apache.grails:grails-logging"
18-
implementation "org.grails.plugins:cache"
16+
implementation "org.apache.grails:grails-cache"
1917
implementation "org.apache.grails:grails-async"
2018
implementation "org.apache.grails:grails-events"
2119
implementation "org.apache.grails:grails-data-hibernate5"
2220
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
23-
implementation "org.grails.plugins:views-json"
21+
implementation "org.apache.grails:grails-views-gson"
2422
implementation "org.apache.grails:grails-data-mongodb-gson-templates"
2523
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
2624
console "org.apache.grails:grails-console"
27-
profile "org.grails.profiles:rest-api"
25+
profile "org.apache.grails.profiles:rest-api"
2826
runtimeOnly "org.glassfish.web:el-impl:2.1.2-b03"
2927
runtimeOnly "com.h2database:h2"
3028
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
3129
testImplementation project(':grails-testing-support-datamapping')
32-
testImplementation "org.grails:grails-web-testing-support"
30+
testImplementation "org.apache.grails:grails-testing-support-web"
3331

3432
implementation project(":grails-plugin-gorm-graphql-plugin")
3533
}

grails-data-graphql/examples/grails-multi-datastore-app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ repositories {
55
dependencies {
66
implementation "org.springframework.boot:spring-boot-starter-logging"
77
implementation "org.springframework.boot:spring-boot-autoconfigure"
8-
implementation "org.apache.grails:grails-core", {
9-
exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated
10-
}
8+
implementation "org.apache.grails:grails-core"
119
implementation "org.springframework.boot:spring-boot-starter-actuator"
1210
implementation "org.springframework.boot:spring-boot-starter-tomcat"
1311
implementation "org.apache.grails:grails-url-mappings"
@@ -19,25 +17,25 @@ dependencies {
1917
implementation "org.apache.grails:grails-databinding"
2018
implementation "org.apache.grails.web:grails-web-boot"
2119
implementation "org.apache.grails:grails-logging"
22-
implementation "org.grails.plugins:cache"
20+
implementation "org.apache.grails:grails-cache"
2321
implementation "org.apache.grails:grails-async"
2422
implementation "org.apache.grails:grails-data-hibernate5"
2523
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
2624
implementation "org.apache.grails:grails-data-mongodb"
27-
implementation "org.grails.plugins:views-json"
25+
implementation "org.apache.grails:grails-views-gson"
2826
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
2927
implementation "org.apache.grails:grails-data-mongodb-gson-templates"
3028
implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
3129
console "org.apache.grails:grails-console"
32-
profile "org.grails.profiles:rest-api"
30+
profile "org.apache.grails.profiles:rest-api"
3331
compileOnly 'org.grails.plugins:embedded-mongodb:2.0.1'
3432
implementation "org.apache.commons:commons-compress:1.10"
3533
implementation "org.glassfish.web:el-impl:2.1.2-b03"
3634
implementation "com.h2database:h2"
3735
implementation "org.apache.tomcat:tomcat-jdbc"
3836
compileOnly "org.apache.grails:grails-testing-support-datamapping"
3937
compileOnly "org.apache.grails:grails-geb"
40-
compileOnly "org.grails:grails-web-testing-support"
38+
compileOnly "org.apache.grails:grails-testing-support-web"
4139
testRuntimeOnly "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
4240
testRuntimeOnly "net.sourceforge.htmlunit:htmlunit:2.18"
4341
testImplementation "org.grails:grails-test-mixins:3.3.0"

grails-data-graphql/examples/grails-tenant-app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
dependencies {
22
implementation "org.springframework.boot:spring-boot-starter-logging"
33
implementation "org.springframework.boot:spring-boot-autoconfigure"
4-
implementation "org.apache.grails:grails-core", {
5-
exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated
6-
}
4+
implementation "org.apache.grails:grails-core"
75
implementation "org.springframework.boot:spring-boot-starter-actuator"
86
implementation "org.springframework.boot:spring-boot-starter-tomcat"
97
implementation "org.apache.grails:grails-url-mappings"
@@ -15,22 +13,22 @@ dependencies {
1513
implementation "org.apache.grails:grails-databinding"
1614
implementation "org.apache.grails.web:grails-web-boot"
1715
implementation "org.apache.grails:grails-logging"
18-
implementation "org.grails.plugins:cache"
16+
implementation "org.apache.grails:grails-cache"
1917
implementation "org.apache.grails:grails-async"
2018
implementation "org.apache.grails:grails-events"
2119
implementation "org.apache.grails:grails-data-hibernate5"
2220
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
23-
implementation "org.grails.plugins:views-json"
21+
implementation "org.apache.grails:grails-views-gson"
2422
implementation "org.apache.grails:grails-data-mongodb-gson-templates"
2523
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
2624
console "org.apache.grails:grails-console"
27-
profile "org.grails.profiles:rest-api"
25+
profile "org.apache.grails.profiles:rest-api"
2826
runtimeOnly "org.glassfish.web:el-impl:2.1.2-b03"
2927
runtimeOnly "com.h2database:h2"
3028
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
3129
testImplementation project(':grails-testing-support-datamapping')
3230
testImplementation "org.apache.grails:grails-geb"
33-
testImplementation "org.grails:grails-web-testing-support"
31+
testImplementation "org.apache.grails:grails-testing-support-web"
3432
testRuntimeOnly "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
3533
testRuntimeOnly "net.sourceforge.htmlunit:htmlunit:2.18"
3634
testImplementation "org.grails:grails-test-mixins:3.3.0"

grails-data-graphql/examples/grails-test-app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
dependencies {
22
implementation "org.springframework.boot:spring-boot-starter-logging"
33
implementation "org.springframework.boot:spring-boot-autoconfigure"
4-
implementation "org.apache.grails:grails-core", {
5-
exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated
6-
}
4+
implementation "org.apache.grails:grails-core"
75
implementation "org.springframework.boot:spring-boot-starter-actuator"
86
implementation "org.springframework.boot:spring-boot-starter-tomcat"
97
implementation "org.apache.grails:grails-url-mappings"
@@ -15,22 +13,22 @@ dependencies {
1513
implementation "org.apache.grails:grails-databinding"
1614
implementation "org.apache.grails.web:grails-web-boot"
1715
implementation "org.apache.grails:grails-logging"
18-
implementation "org.grails.plugins:cache"
16+
implementation "org.apache.grails:grails-cache"
1917
implementation "org.apache.grails:grails-async"
2018
implementation "org.apache.grails:grails-events"
2119
implementation "org.apache.grails:grails-data-hibernate5"
2220
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
23-
implementation "org.grails.plugins:views-json"
21+
implementation "org.apache.grails:grails-views-gson"
2422
implementation "org.apache.grails:grails-data-mongodb-gson-templates"
2523
implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
2624
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
2725
console "org.apache.grails:grails-console"
28-
profile "org.grails.profiles:rest-api"
26+
profile "org.apache.grails.profiles:rest-api"
2927
runtimeOnly "org.glassfish.web:el-impl:2.1.2-b03"
3028
runtimeOnly "com.h2database:h2"
3129
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
3230
testImplementation project(':grails-testing-support-datamapping')
33-
testImplementation "org.grails:grails-web-testing-support"
31+
testImplementation "org.apache.grails:grails-testing-support-web"
3432
testImplementation "org.grails:grails-test-mixins:3.3.0"
3533

3634
implementation project(":grails-plugin-gorm-graphql-plugin")

grails-data-graphql/examples/spring-boot-app/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ dependencies {
2424
// exclude javax variant of hibernate-core
2525
exclude group: 'org.hibernate', module: 'hibernate-core'
2626
}
27-
implementation "org.apache.grails:grails-core", {
28-
exclude group: 'org.grails', module: 'grails-datastore-core' // TODO: Remove after gorm published & core updated
29-
}
27+
implementation "org.apache.grails:grails-core"
3028
implementation project(":gorm-graphql")
3129
//implementation 'org.codehaus.groovy:groovy-astbuilder:3.0.19'
3230
implementation 'jakarta.transaction:jakarta.transaction-api'

grails-data-graphql/plugin/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11

22
plugins {
3-
id "org.grails.grails-plugin"
4-
id "org.grails.plugins.views-json"
3+
id "org.apache.grails.gradle.grails-plugin"
4+
id "org.apache.grails.gradle.grails-gson"
55
}
66

77
dependencies {
88
api "org.apache.grails:grails-controllers"
99
api "org.apache.grails:grails-databinding"
1010
api("org.apache.grails:grails-rest-transforms") {
11-
exclude group: 'org.grails.plugins', module: 'converters'
11+
exclude group: 'org.apache.grails', module: 'grails-converters'
1212
}
1313
api "org.apache.grails:grails-url-mappings"
14-
api "org.grails.plugins:views-json:$viewsJsonVersion"
14+
api "org.apache.grails:grails-views-gson:$viewsJsonVersion"
1515
api 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.3.0'
1616
api "javax.servlet:javax.servlet-api:$servletApiVersion"
1717
api "io.micronaut:micronaut-http-client:$micronautVersion"
1818
api "org.apache.grails:grails-converters:3.3.1"
1919
api 'com.github.javaparser:javaparser-core:3.25.7'
2020
api "com.graphql-java:graphql-java:$graphqlJavaVersion"
21-
testImplementation "org.grails:grails-web-testing-support"
21+
testImplementation "org.apache.grails:grails-testing-support-web"
2222
testImplementation "cglib:cglib-nodep:3.3.0"
23-
profile "org.grails.profiles:web-plugin"
23+
profile "org.apache.grails.profiles:web-plugin"
2424

2525
api project(":gorm-graphql")
2626
}

0 commit comments

Comments
 (0)