From 5c5dd4b5ce190cbf70b3fcbfbf5f42e366816f06 Mon Sep 17 00:00:00 2001 From: BlazingTwist <39350649+BlazingTwist@users.noreply.github.com> Date: Mon, 29 Jan 2024 04:03:29 +0100 Subject: [PATCH] add coverage report to CI --- .github/workflows/maven.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8590c7a..335dbf7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -36,3 +36,21 @@ jobs: - name: Publish Test Report if: success() || failure() uses: ScaCap/action-surefire-report@v1.7.2 + + # Jacoco Coverage, publish to GitHub + - name: Generate jacoco.xml + run: mvn org.jacoco:jacoco-maven-plugin:0.8.11:report + - name: Generate Coverage Report + id: jacoco_reporter + uses: PavanMudigonda/jacoco-reporter@v4.9 + with: + coverage_results_path: target/site/jacoco/jacoco.xml + coverage_report_name: Coverage + coverage_report_title: JaCoCo + github_token: ${{ secrets.GITHUB_TOKEN }} + skip_check_run: false + minimum_coverage: 80 + fail_below_threshold: false + publish_only_summary: false + - name: Add Coverage Job Summary + run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY