go-test-coverage icon indicating copy to clipboard operation
go-test-coverage copied to clipboard

feat: coverage diff change

Open vladopajic opened this issue 1 year ago • 0 comments

some developers prefer to see coverage difference change on their PRs. go-test-coverage could be extended to allow such functionality for those who want it.

  1. give new option which will show error if coverage difference from base branch is below threshold. diff-threshold property will set allowed threshold for coverage difference (in percentage) from base branch. for example, if this property is set to to 5 (meaning 5%), error will be shown if current PR doesn't have at least 5% more code covered. similar, if value is set to -5, PR will be allowed to have up to 5% less covered code then base branch. this property will stack with other rules.

  2. give new option to post comment on PR with coverage difference. diff-comments property will control if GitHub action will post comments on PR with coverage difference.

vladopajic avatar Nov 06 '23 13:11 vladopajic