fgrosse / go-coverage-report

A CLI tool and GitHub Action to post Go code coverage reports as comment to your pull requests.
BSD 3-Clause "New" or "Revised" License
59 stars 11 forks source link

Generate coverage report also if only unit test files changed #20

Closed fgrosse closed 6 months ago

fgrosse commented 6 months ago

With this change, unit test files will no longer be ignored. In order to not make the "Coverage by file" details output confusing, unit tests files are listed separatedly in the PR comment <details> block.

Fixes #18

github-actions[bot] commented 6 months ago

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ :robot:
cmd/go-coverage-report 62.78% (+2.96%) :thumbsup:

Coverage by file ### Changed files (no unit tests) | Changed File | Coverage Δ | Total | Covered | Missed | :robot: | |--------------|------------|-------|---------|--------|---------| | cmd/go-coverage-report/report.go | 82.03% (**+6.14%**) | 128 (+16) | 105 (+20) | 23 (-4) | :thumbsup: | _Please note that the "Total", "Covered", and "Missed" counts above refer to ***code statements*** instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code._ ### Changed unit test files - cmd/go-coverage-report/coverage_test.go - cmd/go-coverage-report/report_test.go