Skip to content

Commit ecf21a6

Browse files
ci(coverage): raise processor coverage gate to 75%
Signed-off-by: night-slayer18 <samanuaia257@gmail.com>
1 parent 4d0cf5f commit ecf21a6

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
go test -count=1 -coverpkg=./processors/... -coverprofile=coverage.out ./tests/...
4949
COVERAGE=$(go tool cover -func=coverage.out | awk '/^total:/ {gsub("%","",$3); print $3}')
5050
echo "Total coverage: ${COVERAGE}%"
51-
awk -v c="$COVERAGE" 'BEGIN { if (c+0 < 50) { exit 1 } }'
51+
awk -v c="$COVERAGE" 'BEGIN { if (c+0 < 75) { exit 1 } }'
5252
5353
- name: GoReleaser config check
5454
if: matrix.os == 'ubuntu-latest'

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ func TestMyProcessor_Transform(t *testing.T) {
6060
go test -v -race -count=1 ./tests/...
6161
```
6262

63+
## Test Expectations for New Processors
64+
65+
- Add tests that cover:
66+
- normal transform behavior
67+
- at least one error or edge-case path (for example invalid input or missing required flags)
68+
- Keep processor coverage healthy with:
69+
70+
```bash
71+
go test -count=1 -coverpkg=./processors/... -coverprofile=coverage.out ./tests/...
72+
go tool cover -func=coverage.out
73+
```
74+
6375
## License
6476

6577
By contributing, you agree your contributions will be licensed under the Apache 2.0 License.

0 commit comments

Comments
 (0)