What happened?
Hello, first of all just wanted to say that I really like this project, it's one of the best coverage actions I've used so far!
I think the new-uncovered-statements-failure and coverage-reduction-failure behaviors are swapped. When using coverage-reduction-failure, even when overall coverage increases, my action fails if there's any Missing > 0 in the diff report.
According to pycobertura's docs on diff exit codes, we have the following exit codes:
2: the changes worsened the overall coverage
3: the changes introduced uncovered statements but the overall coverage is still better than before
As you can see, pycobertura's error exit code 3 indicates that overall coverage increased despite new uncovered lines. However, when we check this action's code, we see that coverage-reduction-failure checks for exit code 2, not 3.
|
if [[ "${{ env.pycobertura_status }}" == "2" && "${{ inputs.coverage-reduction-failure }}" == "true" ]] |
Meanwhile, the new-uncovered-statements-failure matches the worsened the overall coverage descripition, which associates any increase in uncovered line as failures.
|
if [[ "${{ env.pycobertura_status }}" == "3" && "${{ inputs.new-uncovered-statements-failure }}" == "true" ]] |
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy
What happened?
Hello, first of all just wanted to say that I really like this project, it's one of the best coverage actions I've used so far!
I think the
new-uncovered-statements-failureandcoverage-reduction-failurebehaviors are swapped. When usingcoverage-reduction-failure, even when overall coverage increases, my action fails if there's anyMissing > 0in the diff report.According to
pycobertura's docs on diff exit codes, we have the following exit codes:2: the changes worsened the overall coverage3: the changes introduced uncovered statements but the overall coverage is still better than beforeAs you can see,
pycobertura's error exit code3indicates that overall coverage increased despite new uncovered lines. However, when we check this action's code, we see thatcoverage-reduction-failurechecks for exit code2, not3.coverage-action/action.yml
Line 372 in 4ee65a3
Meanwhile, the
new-uncovered-statements-failurematches the worsened the overall coverage descripition, which associates any increase in uncovered line as failures.coverage-action/action.yml
Line 378 in 4ee65a3
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy