Files
fx-serverless/scripts/coverage.sh
Minghe e712e3d0e2 Simplify fx infra (#485)
* add --host and --kubeconf to `fx up`
* remove `fx infra list` and `fx infra use`
* put assets into skip dir for golangci

* fix lint issue

* upgrade go-ssh-client to consume the 'Connectable' API, enable more
friendly SSH connection error message

* parse 'host' and 'kubeconf' for `fx list` and `fx down` also

* refactor parse

* clean infra stuff
2020-03-18 09:00:14 +08:00

16 lines
376 B
Bash
Executable File

#!/usr/bin/env bash
echo "mode: atomic\n" > coverage.txt
for d in `go list ./... | grep -v 'mocks\|images\|examples\|assets\|packrd'`; do
echo $d
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ $? -ne 0 ];then
exit 1
fi
if [ -f profile.out ]; then
cat profile.out | grep -v "mode: atomic" >> coverage.txt
rm profile.out
fi
done