Skip to content

feat: coverage diff change #42

@vladopajic

Description

@vladopajic

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.

Edit: diff-comments is not really used, see usage of breakdown-file-name and diff-base-breakdown-file-name

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions