-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.testcoverage.yml
More file actions
77 lines (64 loc) · 2.05 KB
/
.testcoverage.yml
File metadata and controls
77 lines (64 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Test Coverage Configuration for Eos
# Last Updated: 2026-03-14
#
# Tool: vladopajic/go-test-coverage
# Docs: https://github.com/vladopajic/go-test-coverage
#
# Usage:
# go test -coverprofile=coverage.out -covermode=atomic ./pkg/...
# go-test-coverage --config=.testcoverage.yml
#
# Strategy: Start with realistic thresholds based on actual coverage,
# then ratchet up as tests are added. Current actual coverage is ~30-40%
# across tested packages. Setting aspirational thresholds that never pass
# provides zero value - they're ignored and create a false sense of security.
#
# Ratchet schedule:
# 2026-Q1: 30% total, 20% per-file (current baseline)
# 2026-Q2: 40% total, 30% per-file (target)
# 2026-Q3: 50% total, 40% per-file (target)
# 2026-Q4: 60% total, 50% per-file (target)
# Coverage thresholds (realistic, based on measured coverage)
threshold:
# Overall minimum coverage across all packages
total: 30
# Per-file minimum coverage
file: 20
# Files to exclude from coverage requirements
exclude:
# Generated code (protobuf, codegen, etc.)
- ".*\\.pb\\.go$"
- ".*\\.gen\\.go$"
- ".*_generated\\.go$"
# Mock files
- "mock_.*\\.go$"
- ".*_mock\\.go$"
# Platform compatibility stubs (intentionally minimal)
- ".*_stub\\.go$"
# Test utilities and test infrastructure
- "pkg/testutil/.*"
- "test/.*"
# Main entry point and CLI orchestration (hard to unit test)
- "cmd/.*"
# Vendor directory (external dependencies)
- "vendor/.*"
# Documentation/examples that don't need coverage
- ".*_example\\.go$"
# CGO-dependent packages (require system libraries not available in CI)
- "pkg/cephfs/.*"
- "pkg/kvm/.*"
- "pkg/libvirt/.*"
# Badge configuration
badge:
file-name: coverage.svg
badge-color: green
# Output format
output:
format: text
# Exclusion rules by package
package:
exclude:
# CGO-dependent packages excluded at package level too
- "github.com/CodeMonkeyCybersecurity/eos/pkg/cephfs"
- "github.com/CodeMonkeyCybersecurity/eos/pkg/kvm"
- "github.com/CodeMonkeyCybersecurity/eos/pkg/libvirt"