github.com/line/line-bot-sdk-go/v7@v7.21.0/script/codecov.sh (about)

     1  #!/usr/bin/env bash
     2  # https://github.com/codecov/example-go#caveat-multiple-files
     3  
     4  cd `dirname $0`/.. || exit 1
     5  echo "" > coverage.txt || exit 1
     6  for d in $(go list ./... | grep -v vendor); do
     7    go test -v -race -coverprofile=profile.out -covermode=atomic $d || exit 1
     8    if [ -f profile.out ]; then
     9      cat profile.out >> coverage.txt || exit 1
    10      rm profile.out || exit 1
    11    fi
    12  done