Skip to content

Commit

Permalink
chore(scripts/test): correct mocks path to ignore, add cleanup function
Browse files Browse the repository at this point in the history
  • Loading branch information
mathcale committed Jun 26, 2024
1 parent b33b018 commit db427ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .covignore

This file was deleted.

11 changes: 9 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/sh

set -e

cleanup() {
rm -f coverage.txt coverage.tmp profile.out
}

trap cleanup EXIT

cleanup
echo "mode: set" > coverage.tmp

for d in $(go list ./... | grep -v vendor); do
Expand All @@ -12,7 +20,6 @@ for d in $(go list ./... | grep -v vendor); do
fi
done

cat coverage.tmp | grep -v "/internal/pkg/mocks" > coverage.txt
rm coverage.tmp
cat coverage.tmp | grep -v "/internal/tests/mocks" > coverage.txt

go tool cover -html=coverage.txt

0 comments on commit db427ee

Please sign in to comment.