Skip to content

Commit

Permalink
fixed coverage to work in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhatsharma committed May 18, 2022
1 parent 436c9f2 commit 5dd5938
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
export ZINC_FIRST_ADMIN_USER=admin
export ZINC_FIRST_ADMIN_PASSWORD=Complexpass#123

find ./pkg -name data -type dir|xargs rm -fR
find ./test -name data -type dir|xargs rm -fR
find ./pkg -name data -type d|xargs rm -fR
find ./test -name data -type d|xargs rm -fR

go test ./... -race -covermode=atomic -coverprofile=coverage.out

Expand All @@ -16,13 +16,13 @@ go test ./... -race -covermode=atomic -coverprofile=coverage.out
# Example setup https://github.com/lluuiissoo/go-testcoverage/blob/main/.github/workflows/ci.yml

# enable threshold
COVERAGE_THRESHOLD=20
COVERAGE_THRESHOLD=81

totalCoverage=`go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]'`

# clean up
find ./pkg -name data -type dir|xargs rm -fR
find ./test -name data -type dir|xargs rm -fR
find ./pkg -name data -type d|xargs rm -fR
find ./test -name data -type d|xargs rm -fR
rm coverage.out
# clean up finished

Expand Down

0 comments on commit 5dd5938

Please sign in to comment.