insightsengineering / insightsengineering/coverage-action

[Feature Request]: Upgrade to latest pycobertura

Open
#53 0 comments 0 reactions 2 assignees Claimed by @pawelru View on GitHub
enhancement
Dominant language
No language data
Stars
28
Forks
14
PR merge metrics
No merged PRs in 30d

Description

### Feature description

Pycobertura v4 added support for branch-coverage inspection, which is more accurate at reporting coverage than the previous line/statement only coverage report:

https://github.com/aconrad/pycobertura/blob/master/CHANGES.md#400-2025-04-13

For example, while [this comment](https://github.com/ensuro/ensuro/pull/214#issuecomment-3416090385) using coverage-action reports 100% coverage, reporting with the latest pycobertura version it's slightly below 100%:

```
Filename Stmts Miss Cover Missing
--------------------------------------------- ------- ------ ------- ----------------------
contracts/ETKLib.sol 53 0 100.00%
contracts/EToken.sol 119 0 100.00%
contracts/LPManualWhitelist.sol 31 1 96.77% ~64
contracts/Policy.sol 38 1 97.37% ~179
contracts/PolicyPool.sol 188 1 99.47% ~630
contracts/PolicyPoolComponent.sol 11 0 100.00%
contracts/PremiumsAccount.sol 128 4 96.88% ~198, ~459, ~485, ~490
contracts/Reserve.sol 62 0 100.00%
contracts/RiskModule.sol 40 0 100.00%
contracts/interfaces/IEToken.sol 0 0 100.00%
contracts/interfaces/ILPWhitelist.sol 0 0 100.00%
contracts/interfaces/IPolicyHolder.sol 0 0 100.00%
contracts/interfaces/IPolicyHolderV2.sol 0 0 100.00%
contracts/interfaces/IPolicyPool.sol 0 0 100.00%
contracts/interfaces/IPolicyPoolComponent.sol 0 0 100.00%
contracts/interfaces/IPremiumsAccount.sol 0 0 100.00%
contracts/interfaces/IRiskModule.sol 0 0 100.00%
contracts/interfaces/IUnderwriter.sol 0 0 100.00%
contracts/underwriters/FullTrustedUW.sol 2 0 100.00%
TOTAL 672 7 98.96%
```

Relevant discussion on this pycobertura issue: https://github.com/aconrad/pycobertura/issues/167

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct.

### Contribution Guidelines

- [x] I agree to follow this project's Contribution Guidelines.

### Security Policy

- [x] I agree to follow this project's Security Policy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.