Madrapps / jacoco-report

Github action that publishes the JaCoCo report as a comment in the Pull Request
https://github.com/marketplace/actions/jacoco-report
MIT License
144 stars 63 forks source link

Getting error while setting up multi module project #72

Open slice-saransh-gupta opened 10 months ago

slice-saransh-gupta commented 10 months ago

Was trying to setup jacoco reports for a android multi module project

Rules I have used

      - name: Add coverage to PR
        id: jacoco
        uses: madrapps/jacoco-report@v1.6.1
        with:
          paths: |
            ${{ github.workspace }}/**/build/reports/jacoco/**/jacocoTestReport.xml
          token: ${{ secrets.GITHUB_TOKEN }}
          min-coverage-overall: 40
          min-coverage-changed-files: 80
          update-comment: true
          debug-mode: true
          title: Code Coverage
      - name: Get the Coverage info
        run: |
            echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
            echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
      - name: Fail PR if changed file coverage is less than 80%
        if: ${{ steps.jacoco.outputs.coverage-changed-files < 80.0 }}
        uses: actions/github-script@v6
        with:
          script: |
            core.setFailed('Overall changed file coverage is less than 80%!')

Error I am getting

Screenshot 2023-10-14 at 7 16 44 PM
CalixtoElProgramador commented 9 months ago

I have the same issue

zetbrush commented 8 months ago

Hey there, any update on this issue ? @thsaravana

CalixtoElProgramador commented 8 months ago

by the way, I managed to solve this by deleting the testing directories that did not contain any test in each of the modules

zetbrush commented 8 months ago

@CalixtoElProgramador thx for info, in my case jacoco configs are applied to the modules only - that actually contain test classes, and other modules don't contain test folders as well