1#!/bin/bash -e 2 3echo "" > coverage.txt 4 5TEST_PKGS=$(go list ./... | grep -v /test/) 6 7for d in $TEST_PKGS; do 8 go test -coverprofile=profile.out -covermode=set "$d" 9 if [ -f profile.out ]; then 10 cat profile.out >> coverage.txt 11 rm profile.out 12 fi 13done 14 15curl -fs https://codecov.io/bash | bash -s -- -Z