Copilot commented on code in PR #15687: URL: https://github.com/apache/grails-core/pull/15687#discussion_r3319291757
########## .github/workflows/coverage.yml: ########## @@ -0,0 +1,117 @@ +# 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: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + coverage-core: + name: "Coverage - grails-core (${{ matrix.os }})" + if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: "📥 Checkout repository" + uses: actions/checkout@v6 + - name: "☕️ Setup JDK" + uses: actions/setup-java@v4 + with: + distribution: liberica + java-version: 21 + - name: "🐘 Setup Gradle" + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 + with: + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + - name: "🌡️ Run tests with coverage" + run: > + ./gradlew jacocoAggregateReport + --continue + --stacktrace + -PskipCodeStyle + - name: "📤 Upload coverage artifact" + uses: actions/[email protected] + 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 }})" + if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, macos-latest, windows-latest] Review Comment: Running the full coverage suite across three operating systems (`ubuntu-24.04`, `macos-latest`, `windows-latest`) for both `coverage-core` and `coverage-gradle` produces six artifacts that all get uploaded together to Codecov via `directory: coverage-reports`. Coverage data is largely OS-independent, so this primarily multiplies CI cost (and macOS/Windows minutes are billed at higher rates) without producing meaningfully different coverage signal. Consider restricting the coverage matrix to a single OS (e.g. `ubuntu-24.04`) and keeping multi-OS execution to the existing `gradle.yml` test workflow. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
