From 8131bc60b769f47221a545a42b5d56bedae2751a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 9 May 2015 11:22:33 +0200 Subject: [PATCH 1/3] README: Add coveralls.io badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 877e44a29..0585b9b55 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 ======= From 42467a056e806b2ac6a79cab88512bac421a7336 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 9 May 2015 11:46:38 +0200 Subject: [PATCH 2/3] travis: report coverage to coveralls.io --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index e1793c187..e5c93ce4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,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 +31,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)" From 0cb60e31c51d7ffd8bc899f991682e49ed7292ca Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 9 May 2015 12:24:17 +0200 Subject: [PATCH 3/3] travis: remove unneeded Go version 'release' --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e5c93ce4e..94af0113d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: go go: - 1.3.3 - 1.4.2 - - release os: - linux