Skip to content

Commit

Permalink
Fix codecov report (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
grafviktor authored Jan 14, 2024
1 parent ea6ff3a commit 0162db7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 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=./internal/... -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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ unit.txt
# Temporary notes
*.md
!README.md

# Temporary project files
*.svg
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ audit:
.PHONY: test
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 ./...
go test -coverpkg=./internal/... -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
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignore:
- "cmd/*"
- "github.com/grafviktor/goto/internal/ui/*"
- "internal/mock/*"

0 comments on commit 0162db7

Please sign in to comment.