Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from uber/cover_fix
Browse files Browse the repository at this point in the history
Make sure we have appropriate coverage report
  • Loading branch information
aravindvs authored Jan 5, 2017
2 parents f9f87ea + 3209e7a commit d665a3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: go
directories:
- $HOME/.glide/cache
go:
- 1.7

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ bins: cherami-server cherami-replicator-server cherami-cli cherami-admin cherami

cover_profile: bins
@echo Testing packages:
@mkdir -p $(BUILD)
@echo "mode: atomic" > $(BUILD)/cover.out
@for dir in $(TEST_DIRS); do \
mkdir -p $(BUILD)/"$$dir"; \
go test $(EMBED) "$$dir" $(TEST_ARG) -coverprofile=$(BUILD)/"$$dir"/coverage.out || exit 1; \
cat $(BUILD)/"$$dir"/coverage.out | grep -v "mode: atomic" >> $(BUILD)/cover.out; \
done

cover: cover_profile
@for dir in $(TEST_DIRS); do \
go tool cover -html=$(BUILD)/"$$dir"/coverage.out; \
done
go tool cover -html=$(BUILD)/cover.out

cover_ci: cover_profile
@for dir in $(TEST_DIRS); do \
goveralls -coverprofile=$(BUILD)/"$$dir"/coverage.out -service=travis-ci || echo -e "\x1b[31mCoveralls failed\x1b[m"; \
done
goveralls -coverprofile=$(BUILD)/cover.out -service=travis-ci || echo -e "\x1b[31mCoveralls failed\x1b[m"

clean:
rm -f cherami-server cherami-replicator-server cherami-cli cherami-admin cherami-replicator-tool cherami-cassandra-tool
rm -Rf vendor/*
rm -Rf $(BUILD)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cherami-server
cherami-server [![Build Status](https://travis-ci.org/uber/cherami-server.svg?branch=master)](https://travis-ci.org/uber/cherami-server) [![Coverage Status](https://coveralls.io/repos/uber/cherami-server/badge.svg?branch=master&service=github)](https://coveralls.io/github/uber/cherami-server?branch=master)
==============
[Cherami](https://eng.uber.com/cherami) is a distributed, scalable, durable, and highly available message queue system we developed at Uber Engineering to transport asynchronous tasks.

Expand Down

0 comments on commit d665a3f

Please sign in to comment.