jest-coverage-comment
jest-coverage-comment copied to clipboard
Introduce relative coverage change info
The report will now include information about the relative change in coverage when the previous coverage value is passed along with the file input. For example, if the coverage info is stored in a gist (for the badge), this value can be read out and passed to this action.
coverage-summary-path: ./coverage/coverage-summary.json, 60
multiple-files: |
title1, ./data/coverage_1/coverage-summary.json, 60
title2, ./data/coverage_1/coverage-summary_2.json, 90
ToDo:
- [ ] Update documentation
Example with single file
| Lines | Statements | Branches | Functions |
|---|---|---|---|
■ Unchanged |
76.74% (33/43) | 100% (0/0) | 33.33% (2/6) |
Example with multiple files
| Title | Lines | Statements | Branches | Functions |
|---|---|---|---|---|
| title1 | ▲ Increased (+18%) |
76.74% (33/43) | 100% (0/0) | 33.33% (2/6) |
| title2 | ▼ Decreased (-11%) |
77.27% (34/44) | 100% (0/0) | 33.33% (2/6) |
Thanks for contributing, it's a great feature 💪
I will wait for you to merge from main and resolve the conflicts, so I can see the actual changes.
Maybe this change may be represented in one line?
Example with multiple files
| Title | Lines | Statements | Branches | Functions |
|---|---|---|---|---|
| title1 | 76.74% (33/43) | 100% (0/0) | 33.33% (2/6) | |
| title2 | 77.27% (34/44) | 100% (0/0) | 33.33% (2/6) |
Thanks for your positive feedback!
Maybe this change may be represented in one line?
I like this idea! 👍 I'm going to adjust it accordingly.
@MishaKav Which of these two variants do you like more?
I don't quite like the first variant because the text is not centered vertically along with the badge. I was able to fix that in the second variant. But as you can see, it now has a space in between...
Which of these two variants do you like more?
I like more the second way, even this with space.
I think another improvement may be to represent the Increased with some green icon (example 🟢) and Decreased with red icon (example 🔴) because they usually represent these metrics (but no sure, if it's better)
This is some great work! Can we get this in and a new version released please?
Sorry, haven't been able to finish this over the last weeks! I'll try to do so this weekend 👍
Could I help in some way to get this over the line?
@paescuj @MishaKav is there anything I can do to help this PR get completed?
Hmm thanks I had some different ideas for the final implementation, but I have to take a look at it again. I really intend to complete this pull request, hopefully I'll have time to do so this weekend 👍
This would be very nice to have :)
this is a cool feature. Any updates on when this will be completed/merged?