-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.sh
More file actions
executable file
·36 lines (29 loc) · 817 Bytes
/
Copy path.travis.sh
File metadata and controls
executable file
·36 lines (29 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
GREP_EXCLUDES="vendor\|examples"
LINT_CMD="gometalinter --config .gometalinter.conf"
echo "--- go env"
go env
#echo "--- lint (gometalinter)"
#go get -v -u github.com/alecthomas/gometalinter
#gometalinter --install
#${LINT_CMD} ./...
#echo "--- create build folder ./build"
#mkdir -p build
#echo "--- build and lint examples/*.go"
#for e in $(ls -1 examples/*.go); do
# filename=$(basename $e)
# filename="${filename%.*}"
# echo "* $filename"
# ${LINT_CMD} $e
# go build -o build/$filename $e
#done
echo "--- go test (with race detector and coverage)"
echo "" > coverage.txt
for d in $(go list ./... | grep -v ${GREP_EXCLUDES}); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done