Skip to content

Commit

Permalink
Add code coverage to tests, report to coveralls.io (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
maniksurtani committed May 14, 2018
1 parent dee4960 commit a726bcc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ matrix:
- go: 1.x
env: TEST=UI


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

install:
- 'if [ "$TEST" == "UI" ]; then nvm install 6; fi'

script: test/script.sh
script:
- test/script.sh
- $GOPATH/bin/goveralls -service=travis-ci -package github.com/square/quotaservice

notifications:
slack:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Quota Service
[![license](https://img.shields.io/badge/license-apache_2.0-red.svg?style=flat)](https://raw.githubusercontent.com/square/quotaservice/master/LICENSE)
[![Travis status](https://travis-ci.org/square/quotaservice.svg?branch=master "Travis status")](https://travis-ci.org/square/quotaservice)
[![Coverage Status](https://coveralls.io/repos/github/square/quotaservice/badge.svg)](https://coveralls.io/github/square/quotaservice)
[![GoDoc](https://godoc.org/github.com/square/quotaservice?status.png)](https://godoc.org/github.com/square/quotaservice)
![Project Status](https://img.shields.io/badge/status-beta-orange.svg)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/square/quotaservice?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

# Overview

Expand Down
2 changes: 1 addition & 1 deletion test/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ case "$TEST" in
;;
*)
go vet $(go list ./... | grep -v /vendor/)
go test -race -v ./...
go test -race -v -covermode atomic ./...
;;
esac

0 comments on commit a726bcc

Please sign in to comment.