Repository navigation
fix(hibernate): fetch join of to-one associations and criteria over basic-value collections #9471
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: "Code Style" | |
| on: | |
| push: | |
| branches: | |
| - '[0-9]+.[0-9]+.x' | |
| - '8.0.x-hibernate7.*' | |
| pull_request: | |
| # ready_for_review is not a default type: a draft runs nothing until it is ready or labelled "run ci". | |
| types: [ opened, synchronize, reopened, ready_for_review ] | |
| workflow_dispatch: | |
| # queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| # A pull request labelled "no ci", or a draft without the "run ci" label, skips every job of this workflow. | |
| check_core_projects: | |
| name: "Core Projects" | |
| if: >- | |
| github.event_name != 'pull_request' | |
| || (!contains(github.event.pull_request.labels.*.name, 'no ci') | |
| && (!github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'run ci'))) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: "π Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | |
| run: curl -s https://api.ipify.org | |
| - name: "π₯ Checkout repository" | |
| uses: actions/checkout@v7.0.1 | |
| - name: "βοΈ Setup JDK" | |
| uses: actions/setup-java@v6.1.0 | |
| with: | |
| distribution: liberica | |
| java-version: 21 | |
| - name: "ποΈ Decide the Gradle cache mode" | |
| id: gradle-cache-policy | |
| uses: ./.github/actions/gradle-cache-policy | |
| - name: "π Setup Gradle" | |
| uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 | |
| with: | |
| # Decided by the step above; see .github/actions/gradle-cache-policy. | |
| cache-read-only: ${{ steps.gradle-cache-policy.outputs.read-only }} | |
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | |
| - name: "π Check Core Projects" | |
| run: ./gradlew aggregateStyleViolations validateRepositoryConventions --continue | |
| - name: "π€ Upload Reports" | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: core-reports | |
| path: build/reports/violations/ | |
| - name: "π Publish Code Style Report in Job Summary" | |
| if: always() | |
| run: | | |
| echo "## π Code Style Report - Core Projects" >> $GITHUB_STEP_SUMMARY | |
| for report in CODENARC_VIOLATIONS.md CHECKSTYLE_VIOLATIONS.md REPOSITORY_CONVENTIONS.md; do | |
| file="build/reports/violations/$report" | |
| [ -f "$file" ] && cat "$file" >> $GITHUB_STEP_SUMMARY || true | |
| done | |
| check_forge_projects: | |
| name: "Forge Projects" | |
| if: >- | |
| github.event_name != 'pull_request' | |
| || (!contains(github.event.pull_request.labels.*.name, 'no ci') | |
| && (!github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'run ci'))) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: "π Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | |
| run: curl -s https://api.ipify.org | |
| - name: "π₯ Checkout repository" | |
| uses: actions/checkout@v7.0.1 | |
| - name: "βοΈ Setup JDK" | |
| uses: actions/setup-java@v6.1.0 | |
| with: | |
| distribution: liberica | |
| java-version: 21 | |
| - name: "ποΈ Decide the Gradle cache mode" | |
| id: gradle-cache-policy | |
| uses: ./.github/actions/gradle-cache-policy | |
| - name: "π Setup Gradle" | |
| uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 | |
| with: | |
| # Decided by the step above; see .github/actions/gradle-cache-policy. | |
| cache-read-only: ${{ steps.gradle-cache-policy.outputs.read-only }} | |
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | |
| - name: "π Check Forge Projects" | |
| working-directory: grails-forge | |
| run: ./gradlew codeStyle | |
| - name: "π€ Upload Failure Reports" | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: forge-reports | |
| path: grails-forge/build/reports/code-style/ | |
| - name: "π Publish Code Style Report in Job Summary" | |
| if: always() | |
| run: | | |
| echo "## π Code Style Report - Forge Projects" >> $GITHUB_STEP_SUMMARY | |
| for file in grails-forge/build/reports/code-style/checkstyle/*.xml grails-forge/build/reports/code-style/codenarc/*.xml; do | |
| [ -f "$file" ] || continue | |
| if grep -q "<error " "$file" || grep -q "<Violation " "$file"; then | |
| echo "### β $(basename "$file" .xml)" >> $GITHUB_STEP_SUMMARY | |
| grep "<error " "$file" | awk -F'"' '{print "- **Line " $2 "**: " $8}' >> $GITHUB_STEP_SUMMARY | |
| grep "<Violation " "$file" | awk -F"'" '{print "- **Line " $6 "**: " $2}' >> $GITHUB_STEP_SUMMARY | |
| fi | |
| done | |
| check_gradle_plugin_projects: | |
| name: "Gradle Plugin Projects" | |
| if: >- | |
| github.event_name != 'pull_request' | |
| || (!contains(github.event.pull_request.labels.*.name, 'no ci') | |
| && (!github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'run ci'))) | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: "π Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it | |
| run: curl -s https://api.ipify.org | |
| - name: "π₯ Checkout repository" | |
| uses: actions/checkout@v7.0.1 | |
| - name: "βοΈ Setup JDK" | |
| uses: actions/setup-java@v6.1.0 | |
| with: | |
| distribution: liberica | |
| java-version: 21 | |
| - name: "ποΈ Decide the Gradle cache mode" | |
| id: gradle-cache-policy | |
| uses: ./.github/actions/gradle-cache-policy | |
| - name: "π Setup Gradle" | |
| uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 | |
| with: | |
| # Decided by the step above; see .github/actions/gradle-cache-policy. | |
| cache-read-only: ${{ steps.gradle-cache-policy.outputs.read-only }} | |
| develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} | |
| - name: "π Check Gradle Plugin Projects" | |
| working-directory: grails-gradle | |
| run: ./gradlew aggregateStyleViolations --continue | |
| - name: "π€ Upload Reports" | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: gradle-plugin-reports | |
| path: grails-gradle/build/reports/violations/ | |
| - name: "π Publish Code Style Report in Job Summary" | |
| if: always() | |
| run: | | |
| echo "## π Code Style Report - Gradle Plugin Projects" >> $GITHUB_STEP_SUMMARY | |
| for report in CODENARC_VIOLATIONS.md CHECKSTYLE_VIOLATIONS.md; do | |
| file="grails-gradle/build/reports/violations/$report" | |
| [ -f "$file" ] && cat "$file" >> $GITHUB_STEP_SUMMARY || true | |
| done |