github.com/go-kivik/kivik/v4@v4.3.2/script/coverage.sh (about)

     1  #!/bin/bash -e
     2  
     3  echo "" > coverage.txt
     4  
     5  TEST_PKGS=$(go list ./... | grep -v /test/)
     6  
     7  for 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
    13  done
    14  
    15  curl -fs https://codecov.io/bash | bash -s -- -Z