Skip to content

Conversation

@froozeify
Copy link
Contributor

@froozeify froozeify commented Dec 31, 2025

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 :

@froozeify
Copy link
Contributor Author

I can't assign reviewer on this repo @AdrienClairembault

Copy link
Contributor

@AdrienClairembault AdrienClairembault left a 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.

@froozeify
Copy link
Contributor Author

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.

Comment on lines +3 to +5
# To enable code coverage reporting,
# ensure that the project variable "CODE_COVERAGE" is set to "true"

Copy link
Contributor

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

Comment on lines +34 to +38
## 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`.

Copy link
Contributor

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.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants