File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1
1
language : go
2
2
go :
3
- - 1.7
3
+ - 1.7.1
4
4
install :
5
5
- go get -u github.com/stretchr/testify/assert
6
6
- go get -u github.com/pborman/uuid
9
9
- go get -u github.com/go-openapi/errors
10
10
- go get -u github.com/mitchellh/mapstructure
11
11
script :
12
- - go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
12
+ - ./hack/coverage
13
13
after_success :
14
14
- bash <(curl -s https://codecov.io/bash)
15
15
notifications :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e -o pipefail
3
+
4
+ # Run test coverage on each subdirectories and merge the coverage profile.
5
+ echo " mode: ${GOCOVMODE-atomic} " > coverage.txt
6
+
7
+ # Standard go tooling behavior is to ignore dirs with leading underscores
8
+ # skip generator for race detection and coverage
9
+ for dir in $( go list ./...)
10
+ do
11
+ pth=" $GOPATH /src/$dir "
12
+ go test -race -timeout 20m -covermode=${GOCOVMODE-atomic} -coverprofile=${pth} /profile.out $dir
13
+ if [ -f $pth /profile.out ]
14
+ then
15
+ cat $pth /profile.out | tail -n +2 >> coverage.txt
16
+ rm $pth /profile.out
17
+ fi
18
+ done
19
+
20
+ go tool cover -func coverage.txt
You can’t perform that action at this time.
0 commit comments