From f9e4824a4afea865df00d6481f1a85e4a464604c Mon Sep 17 00:00:00 2001 From: Sergei Zakharenko Date: Tue, 21 Nov 2023 17:27:17 +0300 Subject: [PATCH] Jacoco report workflow added. --- .github/workflows/jacoco_report.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/jacoco_report.yml diff --git a/.github/workflows/jacoco_report.yml b/.github/workflows/jacoco_report.yml new file mode 100644 index 0000000..6e6bfea --- /dev/null +++ b/.github/workflows/jacoco_report.yml @@ -0,0 +1,36 @@ +# A Github action that publishes the JaCoCo report as a comment + +name: Measure coverage + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + push: write + steps: + - name: Checkout + - uses: actions/checkout@v3.0.2 + - name: Set up JDK + uses: actions/setup-java@v3.5.9 + with: + java-version: '17' + distribution: 'zulu' + - name: Run Coverage + run: | + chmod +x gradlew + ./gradlew testCoverage + + - name: Jacoco Report + id: jacoco + uses: madrapps/jacoco-report@v1.6.1 + with: + paths: ${{ github.workspace }}/build/site/jacoco/jacoco.xml + token: ${{ secrets.GITHUB_TOKEN }} + min-coverage-overall: 40 + min-coverage-changed-files: 60 + title: Code Coverage + update-comment: true \ No newline at end of file