diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 1e40d143..cf76d2ab 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -18,7 +18,7 @@ jobs: run: | go test -v -covermode=atomic -coverprofile=cover.out.raw -coverpkg=./... ./... # remove generated code from coverage calculation - grep -Ev 'mock_|_enumer.go' cover.out.raw > cover.out + grep -Ev 'internal/mock|_enumer.go' cover.out.raw > cover.out - name: Generage coverage badge uses: vladopajic/go-test-coverage@bcd064e5ceef1ccec5441519eb054263b6a44787 # v2.8.2 with: diff --git a/.gitignore b/.gitignore index dc0c8d2f..dd43b2de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /dist /cover.out +/cover.out.raw diff --git a/Makefile b/Makefile index 64d11a6f..37854662 100644 --- a/Makefile +++ b/Makefile @@ -23,5 +23,6 @@ fuzz: mod-tidy generate .PHONY: cover cover: mod-tidy generate - go test -v -covermode=atomic -coverprofile=cover.out -coverpkg=./... ./... + go test -v -covermode=atomic -coverprofile=cover.out.raw -coverpkg=./... ./... + grep -Ev 'internal/mock|_enumer.go' cover.out.raw > cover.out go tool cover -html=cover.out