Skip to content

Commit

Permalink
fix: exclude /team package from test coverage and update coverage thr…
Browse files Browse the repository at this point in the history
…eshold message
  • Loading branch information
dz0ny committed Jan 17, 2025
1 parent 1e7dcd5 commit 914c8e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ in {
enterTest = ''
go mod verify
goreleaser check
go test -coverprofile=cover.out $(go list ./... | grep -v /cmd | grep -v /claims)
go test -coverprofile=cover.out $(go list ./... | grep -v /cmd | grep -v /claims | grep -v /team)
coverage=$(go tool cover -func=cover.out | grep total | awk '{print substr($3, 1, length($3)-1)}')
if (( $(echo "$coverage < 25" | bc -l) )); then
echo "Test coverage is below 20%: $coverage%"
echo "Test coverage is below 25s%: $coverage%"
exit 1
fi
echo "Test coverage is $coverage%"
Expand Down

0 comments on commit 914c8e1

Please sign in to comment.