jacoco-report icon indicating copy to clipboard operation
jacoco-report copied to clipboard

Getting error while setting up multi module project

Open slice-saransh-gupta opened this issue 1 year ago • 4 comments

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/[email protected]
        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

slice-saransh-gupta avatar Oct 14 '23 13:10 slice-saransh-gupta

I have the same issue

CalixtoElProgramador avatar Nov 26 '23 02:11 CalixtoElProgramador

Hey there, any update on this issue ? @thsaravana

zetbrush avatar Dec 20 '23 18:12 zetbrush

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

CalixtoElProgramador avatar Dec 20 '23 18:12 CalixtoElProgramador

@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

zetbrush avatar Dec 20 '23 18:12 zetbrush

This should no longer happen in 'v1.7.1'. Please report if you still face this issue. Empty coverage reports will now be ignored.

thsaravana avatar Sep 20 '24 19:09 thsaravana

Please feel free to reopen this if you still face this issue.

instrap avatar Sep 20 '24 19:09 instrap