-
Notifications
You must be signed in to change notification settings - Fork 6
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
Option to only show coverage for files where coverage changed #18
Comments
This would be very cool, because the action currently can't deal with the amount of the files in one of our repos. Listing only the changed files would be a good solution, @marinakalyuzhnaya alternative idea was to remove the expandable part and upload the generated html file to GH artifacts and provide a link to that in the comment. Also a nice solution. |
@janory Yeah I think there are a couple of approaches. I updated the issue to be more specific, that the coverage should only be shown for files where the coverage has changed. Only checking file changes will not be good because deleting tests for a module without modifying the module, would not list the module in the output even though its test coverage has changed. For the simple solutions without diffing, I think we can either upload the results as HTML (IF clicking the link really renders the HTML in the browser) or we can even just stop showing line analysis when there are more than 20 or so files. At the the point where there are hunders of lines of files in the comment its not useful and no one is looking at it anyway. |
I guess the solution will be be to filter only files, where were some changes (updates, delete, new lines) change . And we can get a list of modified files directly in GH https://docs.github.com/en/rest/reference/pulls#list-pull-requests-files |
@marinakalyuzhnaya that doesn't work well because we can lose coverage on files that are not included in the changed files list, and then that will not be visible. For example if you delete tests: I think the best approach is to use diff view that we have, then we can include only files that have a changed diff If we need a short term solution I would just cap the max number of files to be shown, as its not useful to show hunders of lines of files anyway |
Hmm... 🤔 As far as I see you guys have a couple of ideas to solve this already! 💪 Namely:
Are you okay, if I create a PR with these improvements? If you are against these two props in the mater, I will just create a side branch and will use that in our repo. Let me know. |
I think this will be needed improvement for single repo. Otherwise it cant be used in our repo. |
Yep sounds good, I think
|
Currently the action shows coverage for all files in the project.
It would be great if we could show:
This would allow the action to be more usable in a repository with a large amount of files.
The text was updated successfully, but these errors were encountered: