diff --git a/.travis.yml b/.travis.yml index e1793c18..94af0113 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: go go: - 1.3.3 - 1.4.2 - - release os: - linux @@ -19,6 +18,7 @@ notifications: env: GOX_OS="linux darwin openbsd freebsd" install: + - go get github.com/mattn/goveralls - go get github.com/mitchellh/gox - gox -build-toolchain -os "$GOX_OS" - go get -v -t ./... @@ -30,5 +30,8 @@ script: - go test -v ./... - ./testsuite.sh - sh -c "cd backend && go test -v -test.sftppath /usr/lib/openssh/sftp-server ./..." + - go list ./... | while read pkg; do go test -covermode=count -coverprofile=$(base64 <<< $pkg).cov $pkg; done + - 'echo "mode: count" > all.cov; tail -q -n +2 *.cov >> all.cov' + - goveralls -coverprofile=all.cov -service=travis-ci -repotoken "$COVERALLS_TOKEN" - gofmt -l *.go */*.go */*/*.go - test -z "$(gofmt -l *.go */*.go */*/*.go)" diff --git a/README.md b/README.md index 877e44a2..0585b9b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Stories in Ready](https://badge.waffle.io/restic/restic.png?label=ready&title=Ready)](https://waffle.io/restic/restic) [![Build Status](https://travis-ci.org/restic/restic.svg?branch=master)](https://travis-ci.org/restic/restic) [![sourcegraph status](https://sourcegraph.com/api/repos/github.com/restic/restic/.badges/status.png)](https://sourcegraph.com/github.com/restic/restic) +[![Coverage Status](https://coveralls.io/repos/restic/restic/badge.svg)](https://coveralls.io/r/restic/restic) WARNING =======