Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
language: go

script: go test -race -v ./...
before_install:
- go get github.com/mattn/goveralls
- go get github.com/modocache/gover

script:
- go test -race -v ./...
- ./coveralls.bash

go:
- 1.7.x
- 1.8.x
- tip
- 1.7.x
- 1.8.x
- tip
47 changes: 0 additions & 47 deletions coverage.bash

This file was deleted.

31 changes: 31 additions & 0 deletions coveralls.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

if ! type -P gover
then
echo gover missing: go get github.com/modocache/gover
exit 1
fi

if ! type -P goveralls
then
echo goveralls missing: go get github.com/mattn/goveralls
exit 1
fi

if [[ "$COVERALLS_TOKEN" == "" ]]
then
echo COVERALLS_TOKEN not set
exit 1
fi

go list ./... | grep -v '/examples/' | cut -d'/' -f 4- | while read d
do
cd $d
go test -covermode count -coverprofile coverage.coverprofile
cd -
done

gover
goveralls -coverprofile gover.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
find . -name '*.coverprofile' -delete