2017-10-24 23:30:05 +04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
2017-11-29 03:05:20 +00:00
|
|
|
# run the linter
|
2019-02-06 15:00:55 +04:00
|
|
|
# make lint
|
2017-11-29 03:05:20 +00:00
|
|
|
|
2018-05-07 23:23:15 +02:00
|
|
|
# setup certs
|
|
|
|
make gen_certs
|
|
|
|
|
2017-11-29 03:05:20 +00:00
|
|
|
# run the unit tests with coverage
|
|
|
|
echo "" > coverage.txt
|
2017-10-24 23:30:05 +04:00
|
|
|
for d in $(go list ./... | grep -v vendor); do
|
2017-12-29 10:42:02 -05: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 23:30:05 +04:00
|
|
|
done
|
2018-05-07 23:23:15 +02:00
|
|
|
|
|
|
|
# cleanup certs
|
|
|
|
make clean_certs
|