-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Add trend indicator #323
Conversation
Coverage Report for Mock Reports (./test/mockReports)
File CoverageNo changed files found. |
Coverage Report for Root
File Coverage
|
hi @davelosert ! Thanks for the effort. Any estimates on this feature? |
Hi @inomn, this feature is basically ready. What kept me from merging yet is that in it's current form, it requires users's to manually generate both JSON-Reports. I wanted to add another convenience function to automatically download the latest report from the target-branch in order to avoid having to run tests twice during the PR. I hoped I could do this during the christmas-break, but unfortunately wasn't able to finish and pick up the work. I'll see if I can finish it up this week and merge this. |
Hi @davelosert ! Sorry bothering you, any estimates on this feature? Thanks! |
# [2.3.0](v2.2.1...v2.3.0) (2024-02-26) ### Features * Add trend indicator ([#323](#323)) ([698d54e](698d54e))
🎉 This PR is included in version 2.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@inomn : Sorry, that took longer than expected, but I just released the initial version of this feature. Here is the documentation on how to use it. I am still planning to include a feature that will allow you to simply download the latest summary-compare-json automatically from the target branch - but I am not sure when I will be able to do that, and I no longer wanted to keep you waiting. Happy to hear feedback about the feature and how it can be improved! |
This pull request primarily focuses on enhancing the functionality of the coverage reporting system. The changes include the addition of a new
json-summary-compare-path
option to compare coverage summaries, modifications to theREADME.md
andaction.yml
files to reflect this new option, and several file relocations and renames to improve code organization.Fixes #262.
Here are the top five most important changes:
Changes to reporting options:
README.md
: A new optionjson-summary-compare-path
was added to the options table. This option allows users to specify a path to a json summary file to compare against the current run, providing a trend indicator and the difference in the summary.action.yml
: Thefile-coverage-mode
option was moved and thejson-summary-compare-path
option was added. This new option requires a path to the json summary file of the previous run to get trend indicators.Code organization and simplification:
src
directory to thesrc/inputs
andsrc/report
directories. This change improves the organization of the code by grouping related files together. [1] [2] [3] [4] [5] [6] [7] [8] [9]src/index.ts
: The import statements were reordered, and new code was added to handle thejsonSummaryComparePath
option. If this option is provided, the json summary file at the given path is parsed and used to generate the summary table.Changes to coverage reporting:
src/report/generateSummaryTableHtml.test.ts
: New tests were added to check the generation of the summary table when a compare report is provided. These tests check the cases where the coverage increased, decreased, or stayed the same.