Skip to content

Commit 7ee0634

Browse files
committed
Fix coverage
1 parent 12bd29a commit 7ee0634

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ jobs:
4343
run: go build -v ./...
4444

4545
- name: Run tests with coverage
46-
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
46+
run: |
47+
# Exclude examples from coverage
48+
go list ./... | grep -v /examples | xargs go test -v -race -coverprofile=coverage.out -covermode=atomic
4749
4850
- name: Upload coverage to Codecov
4951
if: matrix.go-version == '1.25.x'

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ security:
3737
# Run tests with coverage
3838
coverage:
3939
@echo "Running tests with coverage..."
40-
go test -race -coverprofile=coverage.out -covermode=atomic ./...
40+
@# Exclude examples from coverage
41+
go list ./... | grep -v /examples | xargs go test -race -coverprofile=coverage.out -covermode=atomic
4142
go tool cover -html=coverage.out -o coverage.html
4243
@echo "Coverage report generated: coverage.html"
4344

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<p align="center">
44
<a href="https://godoc.org/github.com/netascode/go-netconf"><img src="https://img.shields.io/badge/api-reference-blue.svg?style=flat-square" alt="GoDoc"></a>
55
<a href="https://goreportcard.com/report/github.com/netascode/go-netconf"><img src="https://goreportcard.com/badge/github.com/netascode/go-netconf?style=flat-square" alt="Go Report Card"></a>
6-
<a href="https://github.com/netascode/go-netconf/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/netascode/go-netconf/test.yml?branch=main&style=flat-square&label=tests" alt="Tests"></a>
6+
<a href="https://github.com/netascode/go-netconf/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/netascode/go-netconf/ci.yml?branch=main&style=flat-square&label=build" alt="CI"></a>
77
<a href="https://codecov.io/gh/netascode/go-netconf"><img src="https://codecov.io/gh/netascode/go-netconf/branch/main/graph/badge.svg?style=flat-square" alt="codecov"></a>
88
<a href="https://github.com/netascode/go-netconf/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg?style=flat-square" alt="License"></a>
99
</p>

0 commit comments

Comments
 (0)