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

Incorrect emoji corresponding to code coverage on changed files in respect with set property min-coverage-changed-files #86

Open AntonShypkov opened 5 months ago

AntonShypkov commented 5 months ago

It's detected that defined threshold for min-coverage-changed-files property does not work properly in connection with setting 'fail-emoji'. Emoji for changed files always appear with positive sign even if threshold is not achieved.

Let me put my example of the step configuration:

  - name: Publish Unit Tests Coverage Results
    uses: madrapps/jacoco-report@v1.6.1
    id: unit-test-coverage
    with:
      paths: .....
      title: Unit Tests Code Coverage
      update-comment: true
      skip-if-no-changes: true
      debug-mode: true
      token: ....
      min-coverage-overall: 90
      min-coverage-changed-files: 90
      continue-on-error: false
      pass-emoji: ':green_circle:'
      fail-emoji: ':red_circle:'

But on PR comment I get emoji from setting 'pass-emoji' for changed file with coverage of 50.19% that's under thresholded 90%. Current picture from PR is depicted on the screenshot below:

image

Here emoji from setting 'fail-emoji' should have been set. But actually, pass-emoji is assigned that's wrong.

I verified, that on version 1.4 (later versions from 1.5 started working incorrectly for this function) it worked correctly. Let me put screenshot here (Just one thing, emoji settings did not exist on that version and appeared only from v1.5.):

image

Hint: may be this issue relates to already registered one https://github.com/Madrapps/jacoco-report/issues/71