-
Notifications
You must be signed in to change notification settings - Fork 21
ci: add code coverage support #56
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
base: main
Are you sure you want to change the base?
Conversation
|
I can't assign reviewer on this repo @AdrienClairembault |
AdrienClairembault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I am not a fan of code coverage as I find it to be a bad metric, but if you find it useful on your side and can gain something from it then I don't mind adding it.
|
It was an idea we discussed with @Rom1-B, but yes coverage could be an indicator for forgotten test on some function but indeed the value shouldn't be taken as proof. I.E: In whatsapp the api calls to the whatsapp API can't be tested and the coverage won't be high. But it can put in light some important method that should be tested. |
| # To enable code coverage reporting, | ||
| # ensure that the project variable "CODE_COVERAGE" is set to "true" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already specified in README file
| ## Enabling Code coverage | ||
| By default, code coverage is disabled. | ||
|
|
||
| If you want to enable it, you have to set your project environment variable `CODE_COVERAGE` to `true`. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably not enough, since you require a specific file name, and certainly a specific format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do as in the other CI steps (e.g., PHPstan), which are triggered by the presence of the config file and not a variable.
Add coverage configuration support using project env variable.
This will create a coverage report on the PR.
CI won't fail, just display a report.
Interconnected PR :