mirror of
https://github.com/openfaas/faas.git
synced 2025-06-14 11:16:47 +00:00
17 lines
422 B
Bash
Executable File
17 lines
422 B
Bash
Executable File
#!/bin/bash -e
|
|
# Run from directory above via ./scripts/cov.sh
|
|
|
|
rm -rf ./cov
|
|
mkdir cov
|
|
go test -v -covermode=atomic -coverprofile=./cov/stan.out
|
|
gocovmerge ./cov/*.out > acc.out
|
|
rm -rf ./cov
|
|
|
|
# If we have an arg, assume travis run and push to coveralls. Otherwise launch browser results
|
|
if [[ -n $1 ]]; then
|
|
$HOME/gopath/bin/goveralls -coverprofile=acc.out
|
|
rm -rf ./acc.out
|
|
else
|
|
go tool cover -html=acc.out
|
|
fi
|