Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
halitdogmen opened this issue Oct 26, 2024 · 9 comments
Open

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

halitdogmen opened this issue Oct 26, 2024 · 9 comments

Comments

@halitdogmen
Copy link

halitdogmen commented Oct 26, 2024

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

Copy link

@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
Copy link
Member

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
Copy link

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

Copy link

@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
Copy link

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

Copy link

@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
Copy link
Member

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.

@halitdogmen
Copy link
Author

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

Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants