diff --git a/.github/workflows/Code_Analyze.yml b/.github/workflows/Code_Analyze.yml index a80c190..793ba60 100644 --- a/.github/workflows/Code_Analyze.yml +++ b/.github/workflows/Code_Analyze.yml @@ -1,7 +1,7 @@ name: Code Analyze on: - push: + pull_request: branches: - main @@ -37,4 +37,15 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - ./gradlew clean test testCodeCoverageReport sonar \ No newline at end of file + ./gradlew clean test testCodeCoverageReport sonar + + - name: Reporting Code Coverage + id: jacoco + uses: madrapps/jacoco-report@1.7.0 + with: + path: | + ${{github.workspace}}/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml + token: ${{ secrets.GITHUB_TOKEN }} + min-coverage-overall: 40 + min-coverage-changed-files: 40 + update-comment: true \ No newline at end of file