diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 04ae3cebff9..ecdba8a9194 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -6,17 +6,70 @@ on: pull_request: branches: - '[7-9]+.[0-9]+.x' +permissions: + contents: read + packages: read jobs: - build: - name: "Build Project" + datastore-build: + name: "Build Datastore Project" + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + java: [ 17, 21 ] + steps: + - name: "đŸ“Ĩ Checkout the repository" + uses: actions/checkout@v4 + - name: "â˜•ī¸ Setup JDK" + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: liberica + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@v4 + with: + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + - name: "🔨 Run Build" + id: build + env: + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew cleanTest build --continue -PonlyDatastoreTests + mongodb-build: + name: "Build Mongodb Project" + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + java: [ 17, 21 ] + mongodb-version: [ '4', '5', '6', '7', '8' ] + steps: + - name: "đŸ“Ĩ Checkout the repository" + uses: actions/checkout@v4 + - name: "â˜•ī¸ Setup JDK" + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: liberica + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@v4 + with: + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + - name: "â–ļī¸ Start MongoDB (needed for some tests)" + uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action) + with: + mongodb-version: ${{ matrix.mongodb-version }} + - name: "🔨 Run Build" + id: build + env: + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew cleanTest build --continue -PonlyMongodbTests + hibernate5-build: + name: "Build Hibernate5 Project" runs-on: ubuntu-24.04 - permissions: - contents: read - packages: read strategy: fail-fast: false matrix: - java: [17, 21] + java: [ 17, 21 ] steps: - name: "đŸ“Ĩ Checkout the repository" uses: actions/checkout@v4 @@ -33,15 +86,12 @@ jobs: id: build env: GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - run: ./gradlew build --continue + run: ./gradlew cleanTest build --continue -PonlyHibernate5Tests publish: if: github.event_name == 'push' name: "Publish Snapshot" - needs: build + needs: [datastore-build, hibernate5-build, mongodb-build] runs-on: ubuntu-24.04 - permissions: - contents: read - packages: read steps: - name: "đŸ“Ĩ Checkout the repository" uses: actions/checkout@v4 @@ -68,8 +118,7 @@ jobs: needs: publish runs-on: ubuntu-24.04 permissions: - contents: write - packages: read + contents: write # so gh-pages can be updated steps: - name: "đŸ“Ĩ Checkout the repository" uses: actions/checkout@v4 @@ -97,7 +146,7 @@ jobs: trigger-build-gorm-impls: if: github.event_name == 'push' name: "Trigger Build in GORM Implementations" - needs: [build, publish] + needs: [publish] runs-on: ubuntu-24.04 continue-on-error: true steps: @@ -111,14 +160,6 @@ jobs: - name: "📝 Create Snapshot Message for the Workflow Dispatch" id: dispatch_message run: echo "value={\"message\":\"New Data Mapping Snapshots $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT - - name: "📡 Invoke the Java CI workflow in GORM Hibernate5" - uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action) - continue-on-error: true - with: - workflow: Java CI - repo: grails/gorm-hibernate5 - ref: ${{ steps.extract_branch.outputs.value }} - token: ${{ secrets.GH_TOKEN }} - name: "📡 Invoke the Java CI workflow in GORM Hibernate6" continue-on-error: true uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action) @@ -126,22 +167,4 @@ jobs: workflow: Java CI repo: grails/gorm-hibernate6 ref: ${{ steps.extract_branch.outputs.value }} - token: ${{ secrets.GH_TOKEN }} - - name: "📡 Invoke the Java CI workflow in GORM MongoDB" - continue-on-error: true - uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action) - with: - workflow: Java CI - repo: grails/gorm-mongodb - ref: ${{ steps.extract_branch.outputs.value }} - token: ${{ secrets.GH_TOKEN }} - inputs: ${{ steps.dispatch_message.outputs.value }} - - name: "📡 Invoke the Java CI workflow in GORM Neo4j" - if: false # Skip until neo4j is ported to grails 7 - continue-on-error: true - uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action) - with: - workflow: Java CI - repo: grails/gorm-neo4j - ref: ${{ steps.extract_branch.outputs.value }} token: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 2a539c948b8..8153a8af957 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -127,6 +127,10 @@ jobs: key: cache-local-maven-${{ github.sha }} - name: "đŸĒļ Add mavenLocal repository to build" run: sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' build.gradle + - name: "â–ļī¸ Start MongoDB (needed for some tests)" + uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action) + with: + mongodb-version: '8' - name: "🔨 Build and test the project using the locally built Groovy snapshot" env: GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 63b7bd4b46e..34ba94634ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,33 @@ +!gradle-wrapper.jar +*.db +*.iml +*.ipr +*.iws +*.sha1 *.swp -.settings/ +*.zip +.DS_Store .classpath -.project +.gradle +.gradletasknamecache +.idea .metadata -.DS_Store +.project +.settings/ +Servers/ +bin/ build/ -target/ -.gradle/ -grails-plugins/mongodb/web-app +classes/ +eclipse-workspace/ +gradle-app.setting grails-plugins/checkout -grails-plugins/redis/web-app +grails-plugins/mongodb/grails-mongodb-1.0.0.RC5.zip.sha1 +grails-plugins/mongodb/web-app grails-plugins/neo4j/web-app -eclipse-workspace/ -Servers/ +grails-plugins/redis/web-app out -stacktrace.log -*.iws -*.iml -*.ipr -.idea/* -classes/* -bin/ -boot-plugins/*/.idea/* -grails-plugins/mongodb/grails-mongodb-1.0.0.RC5.zip.sha1 +prodDb.mv.db +secring.gpg spy.log -*.db - -*.sha1 - -*.zip +stacktrace.log +target/ diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 00000000000..62aea7b45a5 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,10 @@ +# Various properties that control which tests run +* onlyHibernate5Tests +* onlyMongodbTests +* onlyDatastoreTests +* skipHibernate5Tests +* skipMongodbTests +* skipDatastoreTests + +# Start a mongo docker container +docker run -d --name mongo-on-docker -p 27017:27017 mongo \ No newline at end of file diff --git a/build.gradle b/build.gradle index e81dac3f0b4..c51e6e43f72 100644 --- a/build.gradle +++ b/build.gradle @@ -54,6 +54,7 @@ version = projectVersion group = 'this.will.be.overridden' def publishedProjects = [ + // datastore 'grails-datastore-async', 'grails-datastore-core', 'grails-datastore-gorm', @@ -61,10 +62,25 @@ def publishedProjects = [ //'grails-datastore-gorm-rx', 'grails-datastore-gorm-support', 'grails-datastore-gorm-tck', - 'grails-datastore-gorm-test', + 'grails-datastore-gorm-tck-base', + 'grails-datastore-gorm-tck-domains', 'grails-datastore-gorm-validation', 'grails-datastore-web', 'grails-gorm-testing-support', + // simple + 'simple-gorm', + // hibernate5 + 'hibernate5-boot-plugin', + 'hibernate5-database-migration', + 'hibernate5-gorm', + 'hibernate5-grails-plugin', + // mongodb + 'mongodb-boot-plugin', + 'mongodb-gorm', + 'mongodb-gorm-bson', + 'mongodb-gorm-ext', + 'mongodb-grails-plugin', + 'mongodb-views-json-templates' ] subprojects { if (name in publishedProjects) { @@ -73,4 +89,4 @@ subprojects { } } -apply from: layout.projectDirectory.file('gradle/documentation-config.gradle') \ No newline at end of file +apply from: layout.projectDirectory.file('gradle/documentation-config.gradle') diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 838b6f565e4..1bc0e791f22 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -8,7 +8,7 @@ file('../gradle.properties').withInputStream { } repositories { - mavenLocal() +// mavenLocal() maven { url = 'https://repo.grails.org/grails/core' } mavenCentral() if (System.getenv('GITHUB_MAVEN_PASSWORD')) { @@ -25,5 +25,7 @@ repositories { dependencies { implementation platform("org.grails:grails-bom:${versions.getProperty('grailsVersion')}") implementation 'org.grails:grails-gradle-plugin' - runtimeOnly 'io.github.gradle-nexus:publish-plugin:2.0.0' + implementation 'com.bertramlabs.plugins:asset-pipeline-gradle' + implementation 'org.grails.plugins:views-gradle' + implementation 'org.springframework.boot:spring-boot-gradle-plugin' } \ No newline at end of file diff --git a/docs/data-mapping-website/src/main/resources/index.html b/docs/data-mapping-website/src/main/resources/index.html index c78b79350c7..1e49dc640e7 100644 --- a/docs/data-mapping-website/src/main/resources/index.html +++ b/docs/data-mapping-website/src/main/resources/index.html @@ -82,8 +82,8 @@

Socialize