mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 10:27:08 +02:00
ci: exclude test helpers and generated code from the coverage report
The coverage profile counted the tests/ package and the *_gen.go files, none of which are code under test: tests/ is the mock and helper package, and generated code is never hand-tested. Together they added 2926 uncounted statements at 0%, pulling the reported number down by almost 6 points (70.13% -> 75.98% on the current master profile). octocov's coverage.exclude takes doublestar globs matched against git-root-relative paths. All 26 mock_*.go files live under tests/, so the single 'tests/**' pattern covers them.
This commit is contained in:
parent
88cd1c3937
commit
b77fb45088
1 changed files with 4 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ coverage:
|
||||||
# switches to line counting when it merges several itself.
|
# switches to line counting when it merges several itself.
|
||||||
paths:
|
paths:
|
||||||
- coverage.out
|
- coverage.out
|
||||||
|
# Not code under test: tests/ holds the mocks and helpers, *_gen.go is generated.
|
||||||
|
exclude:
|
||||||
|
- 'tests/**'
|
||||||
|
- '**/*_gen.go'
|
||||||
codeToTestRatio:
|
codeToTestRatio:
|
||||||
# Needs the pull request's own source, which the comment workflow must not
|
# Needs the pull request's own source, which the comment workflow must not
|
||||||
# check out: it holds a write token.
|
# check out: it holds a write token.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue