Skip to content

Commit

Permalink
switch to more compatible bc expr
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws committed Dec 13, 2023
1 parent 2bdcee7 commit 4aa73ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ THRESHOLD=75 # percentage

go test -coverprofile c.out ./...
cov=$(go tool cover -func c.out | grep '^total:' | awk '{ print $3+0 }')
if [[ $(bc --expression="$cov < $THRESHOLD") ]]; then
if [[ $(echo "$cov < $THRESHOLD" | bc) ]]; then
echo "threshold not met - code must be at or above $THRESHOLD% coverage"
exit 1
fi

0 comments on commit 4aa73ba

Please sign in to comment.