Files
fx-serverless/scripts/coverage.sh
Minghe 5b9685a5b5 refactor config (#140) (#141)
* refactor config

* fix uri issue
2018-06-24 00:40:22 +08:00

15 lines
431 B
Bash
Executable File

#!/usr/bin/env bash
echo "mode: atomic\n" > coverage.txt
# TODO it's very weird, tests of api/service always fails on CirCleCI environment,
# but works on local
for d in `go list ./... | grep -v 'third_party\|examples\|assets'`; do
echo $d
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out | grep -v "mode: atomic" >> coverage.txt
rm profile.out
fi
done