Conversation
| run: | | ||
| sudo service apache2 start | ||
| - name: "Setup coverage driver" | ||
| if: ${{ !cancelled() && inputs.code-coverage == true }} |
There was a problem hiding this comment.
For activation, I think we need to follow the same logic as the other steps and test for the presence of the configuration file instead of defining a variable.
| if: ${{ !cancelled() && inputs.code-coverage == true }} | |
| if: ${{ !cancelled() && hashFiles(format('{0}/cobertura.xml', inputs.plugin-key)) != '' }} |
Same logic every time you test inputs.code-coverage == true
|
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) |
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)