parroty / excoveralls

Coverage report tool for Elixir with coveralls.io integration.
MIT License
820 stars 178 forks source link

Enforce minimum coverage in all test types #305

Open vereis opened 1 year ago

vereis commented 1 year ago

Ahoy again!

This PR implements a new flag to excoveralls: --enforce-minimum-coverage. When this is provided, we always run Stats.ensure_minimum_coverage/1 regardless of what testing type you're running.

For example:

mix coveralls.json --enforce-minimum-coverage
mix coveralls.github --enforce-minimum-coverage
...

I've refactored the existing type implementations that call Stats.ensure_minimum_coverage/1 by default and removed these calls. Instead, when running Mix.Tasks.Coveralls.do_run/2 I check to see if the type requested was either html, local, or cobertuna and if so, I automatically set --enforce-minimum-coverage to retain backwards behavioural compatibility.

Closes #297

vereis commented 1 year ago

@parroty ahoy! Any thoughts on this PR? Happy to keep iterating on it if you think there is anything missing?

tielur commented 1 year ago

Following up on this as well. Ran into this at work and didn't realize that coveralls.json didn't support the minimum coverage. Would love to see it work for that

nathany-copia commented 1 year ago

Likewise for coveralls.github -- kind've expected that to be the default behaviour, to be honest.

gtrias commented 9 months ago

Hey! I'm very interested on these changes. Any plans to merge it anytime soon?

gitneko commented 8 months ago

Hello! What is the status of this PR? Is there anything blocking this from merging?

parroty commented 5 months ago

I'm sorry being not responsive. I appreciate any help resolving conflicts.