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