Skip to content

Commit

Permalink
Add Coveralls integration
Browse files Browse the repository at this point in the history
  • Loading branch information
christophermaier committed Mar 12, 2017
1 parent 8198a4f commit d2bc515
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ before_install:
# Parallelize these tasks
env:
- TARGET=vet
- TARGET=test #ci-coveralls
- TARGET=ci-coveralls

# Need the job ID in order to upload the Coveralls data
script:
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM operable/go:1.6.3

# TODO: Consider adding goveralls to base image
ENV PATH=${GOPATH}/bin:${PATH}
# Add goveralls for sending stats to coveralls.io in Travis CI
RUN go get github.com/mattn/goveralls

COPY . $GOPATH/src/github.com/operable/go-relay
WORKDIR $GOPATH/src/github.com/operable/go-relay
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ test: tools deps lint
@rm -rf relay_*_amd64
@go test -v -cover $(FULL_PKGS)

# This is only intended to run in Travis CI and requires goveralls to
# be installed.
ci-coveralls: tools deps
goveralls -service=travis-ci

clean:
rm -rf $(BUILD_DIR) relay-test
find . -name "*.test" -type f | xargs rm -fv
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Relay

[![Build Status](https://travis-ci.org/operable/go-relay.svg?branch=master)](https://travis-ci.org/operable/go-relay)
[![Coverage Status](https://coveralls.io/repos/github/operable/go-relay/badge.svg?branch=master)](https://coveralls.io/github/operable/go-relay?branch=master)

## Dependencies

Expand Down

0 comments on commit d2bc515

Please sign in to comment.