2017-10-24 12:30:05 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2017-11-28 19:05:20 -08:00
|
|
|
# run the linter
|
2017-12-29 07:42:02 -08:00
|
|
|
# make metalinter_test
|
2017-11-28 19:05:20 -08:00
|
|
|
|
2018-05-07 14:23:15 -07:00
|
|
|
# setup certs
|
|
|
|
make gen_certs
|
|
|
|
|
2017-11-28 19:05:20 -08:00
|
|
|
# run the unit tests with coverage
|
|
|
|
echo "" > coverage.txt
|
2017-10-24 12:30:05 -07:00
|
|
|
for d in $(go list ./... | grep -v vendor); do
|
2017-12-29 07:42:02 -08:00
|
|
|
go test -race -coverprofile=profile.out -covermode=atomic "$d"
|
|
|
|
if [ -f profile.out ]; then
|
|
|
|
cat profile.out >> coverage.txt
|
|
|
|
rm profile.out
|
|
|
|
fi
|
2017-10-24 12:30:05 -07:00
|
|
|
done
|
2018-05-07 14:23:15 -07:00
|
|
|
|
|
|
|
# cleanup certs
|
|
|
|
make clean_certs
|