Repository navigation
fix(hibernate): fetch join of to-one associations and criteria over basic-value collections #5358
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: "Coverage" | |
| 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: | |
| inputs: | |
| run-tests: | |
| description: "Run the test jobs where the branch rule would skip them (a release branch below the default); a [skip tests] head commit still skips them" | |
| type: boolean | |
| default: false | |
| # One run per branch or pull request: a new commit cancels the run in flight, whose result would be for a | |
| # superseded commit. This workflow publishes nothing, so nothing here needs to survive the cancel. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| policy: | |
| name: "CI policy" | |
| # A pull request labelled "no ci", or a draft without the "run ci" label, skips this job; every other | |
| # job needs it, so nothing runs for such a pull request. | |
| 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'))) | |
| uses: ./.github/workflows/ci-policy.yml | |
| coverage-core: | |
| name: "Coverage - grails-core (${{ matrix.os }})" | |
| needs: [ policy ] | |
| if: ${{ needs.policy.outputs.run-tests == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - 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: "🌡️ Run tests with coverage" | |
| run: > | |
| ./gradlew jacocoAggregateReport | |
| --continue | |
| --stacktrace | |
| -PskipCodeStyle | |
| - name: "📤 Upload coverage artifact" | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: coverage-core-${{ matrix.os }} | |
| path: build/reports/jacoco/aggregate/jacocoAggregateReport.xml | |
| if-no-files-found: warn | |
| coverage-gradle: | |
| name: "Coverage - grails-gradle (${{ matrix.os }})" | |
| needs: [ policy ] | |
| if: ${{ needs.policy.outputs.run-tests == 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - 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: "🌡️ Run tests with coverage" | |
| working-directory: grails-gradle | |
| run: > | |
| ./gradlew jacocoAggregateReport | |
| --continue | |
| --stacktrace | |
| -PskipCodeStyle | |
| - name: "📤 Upload coverage artifact" | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: coverage-gradle-${{ matrix.os }} | |
| path: grails-gradle/build/reports/jacoco/aggregate/jacocoAggregateReport.xml | |
| if-no-files-found: warn | |
| upload-coverage: | |
| name: "Upload Coverage to Codecov" | |
| needs: [ policy, coverage-core, coverage-gradle ] | |
| # Run even if some matrix legs fail so partial coverage is still uploaded, but not on a run that skipped the tests | |
| if: ${{ always() && needs.policy.outputs.run-tests == 'true' }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: "📥 Checkout repository" | |
| uses: actions/checkout@v7.0.1 | |
| - name: "📥 Download all coverage artifacts" | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| path: coverage-reports | |
| - name: "📊 Upload coverage to Codecov" | |
| continue-on-error: true | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: coverage-reports | |
| verbose: true |