Code coverage support#49
Conversation
|
We should create a dedicated config file. For example If the file is not present or if his field Enabled field is optional, value is true by default. For glpi-empty, we would be able like that to set it has example with This file would should contain something like {
"enabled": true,
"lower_threshold": 50,
"upper_threshold": 75,
"fail_below_min": false
}We should probably also create a generic action for the code coverage report config in that case. (if feasible) |
435f715 to
91aa982
Compare
91aa982 to
39189e4
Compare
|
Small issue reported to me by @cedric-anne is that currently the Some plugin could have 2 "main" branch one for 10.x and one for 11.x so the coverage difference could be biased. We should see if it will have a big impact, supporting both based on PR would probably mean an even bigger ci code for check/updating those artifacts. (Probably not possible to trigger artifact refresh on target branch before running the ci and coverage on current pr, not sure github support synchronous run like that) |
|
In that case, perhaps the simplest solution would be to run it only with the main branch? So, don't display anything with 10.0./bugfixes. |
|
I've updated to run coverage only when the default branch is targeted. |
|
Please rebase |
|
On it, pushed accidentally before rebase ;) |
This PR add code coverage support for plugin.
By default the coverage is not enabled.
For a better output, plugin can extract the report to automatically create a comment on the PR with the report in md format.
Interconnected PR :
Whatsapp plugin got a dedicated PR to test the modification (see in the feed under for the link)
Screenshot
Once the project is merged on main you got comparison otherwise (whatsapp branch) :
Test PR with simulated code into main
https://github.com/glpi-network/whatsapp-wcoverage/pull/2
Test PR targeting not the default branch (coverage should not be run)
https://github.com/glpi-network/whatsapp-wcoverage/pull/3