PR and master coverage comparison #59
Workflow file for this run
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
| # | |
| # Copyright 2019 ABSA Group Limited | |
| # | |
| # Licensed 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 | |
| # | |
| # http://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: JaCoCo development report | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| types: [ opened, edited, synchronize, reopened ] | |
| jobs: | |
| test: | |
| runs-on: [ubuntu-latest] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # scala: [ 2.11, 2.12, 2.13 ] -- 2.13 produce problems | Support can wait until we will decide to move from 2.12 | |
| scala: [ 2.11, 2.12 ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Scala | |
| uses: olafurpg/setup-scala@v10 | |
| with: | |
| java-version: "adopt@1.8" | |
| - name: Build and run tests | |
| run: mvn clean verify -Pcode-coverage,scala-${{ matrix.scala }} --no-transfer-progress | |
| - name: Upload Jacoco report as workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PR jacoco report xml ${{ matrix.scala }} | |
| path: target/site/jacoco/jacoco.xml | |
| - name: Checkout master branch into separate folder | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| path: master_code | |
| - name: Build and run tests (master branch) | |
| working-directory: master_code | |
| run: mvn clean verify -Pcode-coverage,scala-${{ matrix.scala }} --no-transfer-progress | |
| - name: Upload Jacoco report as workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Master jacoco report xml ${{ matrix.scala }} | |
| path: master_code/target/site/jacoco/jacoco.xml | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Add JaCoCo Report in PR comments | |
| id: jacoco | |
| uses: MoranaApps/jacoco-report@feature/3-Introduce-GH-Action-workspace-restriction | |
| with: | |
| token: '${{ secrets.GITHUB_TOKEN }}' | |
| paths: | | |
| **/target/site/jacoco/jacoco.xml | |
| exclude-paths: | | |
| master_code/** | |
| baseline-paths: | | |
| master_code/**/target/site/jacoco/jacoco.xml | |
| title: JaCoCo code coverage report - Scala ${{ matrix.scala }} | |
| sensitivity: "detail" | |
| comment-mode: 'single' | |
| min-coverage-overall: 75.0 | |
| min-coverage-changed-files: 80.0 |