code-coverage-action icon indicating copy to clipboard operation
code-coverage-action copied to clipboard

Uncovered files and lines are not appearing in the comments.

Open halitdogmen opened this issue 1 year ago • 9 comments

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

halitdogmen avatar Oct 26 '24 20:10 halitdogmen

@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

devactivity-app[bot] avatar Oct 26 '24 20:10 devactivity-app[bot]

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?

vitaliimelnychuk avatar Oct 31 '24 17:10 vitaliimelnychuk

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

harsh-clear avatar Nov 14 '24 11:11 harsh-clear

@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

devactivity-app[bot] avatar Nov 14 '24 11:11 devactivity-app[bot]

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

abhishek1402 avatar Nov 15 '24 15:11 abhishek1402

@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

devactivity-app[bot] avatar Nov 15 '24 15:11 devactivity-app[bot]

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.

vitaliimelnychuk avatar Nov 16 '24 00:11 vitaliimelnychuk

Hi @vitaliimelnychuk Sorry for the late reply; the end-of-year quarter has been quite busy. The reason the two images look different is that the first one is the result of my experiment, while the second is an image from a Medium post promoting the action. In fact, the two applications are the same, but their GitHub templates are different.

The negative coverage result was expected because I intentionally deleted a previously written test to highlight the uncovered lines.

I'm sending you the logs you requested.

image

Thanks for your support

halitdogmen avatar Dec 11 '24 22:12 halitdogmen

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

icon

devactivity-app[bot] avatar Dec 11 '24 22:12 devactivity-app[bot]