Go

User Contributed:

Instructions in README.

Currently goveralls works great from Drone.io, and it does work with Travis CI. The process is simple, and documented on the README for goveralls.

Instructions for using Travis

Thanks to Colton Baker for instructions on how to get Coveralls working with Travis. Here is the configuration needed to start building:

language: go

go:

  • 1.2
  • tip

install:

go get golang.org/x/tools/cmd/cover
go get github.com/mattn/goveralls

script:

go test -v -covermode=count -coverprofile=coverage.out
$HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN

To add the $COVERALLS_TOKEN, you should use the documentation at http://docs.travis-ci.com/user/encryption-keys/ to safely encrypt your $COVERALLS_TOKEN so that it is not available to the world. The command line tool that they install through this documentation will automatically add the encrypted environment variable to the .travis.yml file, and you can then immediately deploy it to Travis and Coveralls.

Another way that you can do this if you change your main GOPATH is by using:

$(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
Have more questions? Submit a request

Comments

Powered by Zendesk