Skip to content

Commit

Permalink
Fix codecov report
Browse files Browse the repository at this point in the history
  • Loading branch information
grafviktor committed Jan 2, 2024
1 parent 5aa12e9 commit 1dcd53a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
go-version: ${{ matrix.go-version }}
cache: true
- name: Test
run: go test -coverpkg=$(go list ./internal/..|grep -v mock) -race -vet=off -count=1 -coverprofile unit.txt -covermode atomic ./...
run: go test -coverpkg=$(go list ./internal/... | grep -v mocks | tr '\n' ',') -race -vet=off -count=1 -coverprofile unit.txt -covermode atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ audit:
test:
@echo 'Running unit tests'
# By using -coverpkg=$$(go list ./internal/..|grep -v mock) we exclude "mock" folder from codecov report
go test -coverpkg=$$(go list ./internal/..|grep -v mock) -race -vet=off -count=1 -coverprofile unit.txt -covermode atomic ./...
ALL_PACKAGES_EXCLUDE_MOCKS=$(go list ./internal/... | grep -v mocks | tr '\n' ',')
go test -coverpkg=$$ALL_PACKAGES_EXCLUDE_MOCKS -race -vet=off -count=1 -coverprofile unit.txt -covermode atomic ./...

## unit-test-report: display unit coverage report in html format
.PHONY: unit-test-report
Expand Down

0 comments on commit 1dcd53a

Please sign in to comment.