2016-07-30 16:32:36 +02:00
|
|
|
test:
|
2016-07-30 20:16:23 +02:00
|
|
|
pre:
|
|
|
|
- go get github.com/jstemmer/go-junit-report
|
|
|
|
- go get github.com/mattn/goveralls
|
2016-07-30 16:32:36 +02:00
|
|
|
override:
|
2016-12-20 08:52:57 +02:00
|
|
|
- go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
|
2016-07-30 20:16:23 +02:00
|
|
|
- >
|
|
|
|
echo "mode: set" > $CIRCLE_ARTIFACTS/coverage.txt &&
|
|
|
|
for i in $(go list ./...); do
|
|
|
|
rm -f coverage.tmp;
|
2016-12-20 08:52:57 +02:00
|
|
|
go test -v -coverprofile coverage.tmp $i;
|
2016-07-30 20:16:23 +02:00
|
|
|
tail -n +2 coverage.tmp >> $CIRCLE_ARTIFACTS/coverage.txt;
|
|
|
|
done
|
|
|
|
post:
|
2016-12-20 08:52:57 +02:00
|
|
|
- cat $CIRCLE_ARTIFACTS/gotest.txt | go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
|
|
|
|
- goveralls -coverprofile=$CIRCLE_ARTIFACTS/coverage.txt -service=circle-ci -repotoken=$COVERALLS_TOKEN
|