barecheck / code-coverage-action

GitHub Action that generates code coverage reports
https://barecheck.com
MIT License
63 stars 14 forks source link

Uncovered files and lines are not appearing in the comments. #290

Open halitdogmen opened 1 month ago

halitdogmen commented 1 month ago

First of all, I'm not sure if the configurations are correct. I was running a simple test to integrate it into the pipelines, but I didn't get the expected result. I wanted to share this with you.

Job configuration is as follows.

- name: Generate Code Coverage Report
  id: code-coverage
  uses: barecheck/code-coverage-action@v1
  with:
    barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
    lcov-file: "source_coverage.lcov.info"
    base-lcov-file: "target_coverage.lcov.info"
    send-summary-comment: true
    show-annotations: "warning"

The output in the comments is as follows. image Expected Output: image

Could you please help resolve this so that uncovered files and lines appear as expected in the comments?

Lcov Files: lcov-files.zip

devactivity-app[bot] commented 1 month ago

@halitdogmen, ⭐3 XP earned, 🏆First Issue Created completed! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]

icon
vitaliimelnychuk commented 3 weeks ago

Hi @halitdogmen, sure, let me have a look.

I see these two screenshots are very different, are they from the same application?

As a note also, this comment is sent based on Pull request files changes. If files were not changed in the PR than you wouldn't see those files in that section. This still doesn't explain why you have negative coverage and also 'all changes covered'.

Can you also send me logs from your github action execution?

harsh-clear commented 1 week ago

Hi @halitdogmen, I am also experiencing the same issue as mentioned by the original poster. Our configurations are almost identical:

send-summary-comment: true
show-annotations: "warning"

We are using these two flags, but we’re not receiving the expected summary comment for uncovered files, nor are we seeing any annotations in the PR. Below are the logs from our GitHub Action execution.

image

devactivity-app[bot] commented 1 week ago

@harsh-clear, ⭐3 XP earned, 🏆First Comment Added completed! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]

icon
abhishek1402 commented 1 week ago

Same not able to see the uncovered files and lines also not getting any annotations using the following configuration

image
devactivity-app[bot] commented 1 week ago

@abhishek1402, ⭐3 XP earned, 🏆First Comment Added completed! Contribute more to raise your XP/Level, complete challenges for extra achievements! [Sign up for personal dashboard]

icon
vitaliimelnychuk commented 1 week ago

Hi @abhishek1402 and @harsh-clear!

Can you please send your lcov-file and base-lcov-file?

I just wanted to make sure that you have any uncovered lines in the diff. The action compares only files that were changed in the PR. If you had more uncovered files in your files, but they were not part of the Pull request, you wouldn't have a comment added.