Skip to content

Commit

Permalink
Merge pull request #27 from cdennison/coverpkg-doc
Browse files Browse the repository at this point in the history
Coverpkg doc (Issue #25) plus other helpful info
  • Loading branch information
deankarn authored Dec 19, 2017
2 parents 496ba56 + db5d9c1 commit 290b046
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,27 @@ Package overalls
[![Build Status](https://travis-ci.org/go-playground/overalls.svg?branch=master)](https://travis-ci.org/go-playground/overalls)
[![GoDoc](https://godoc.org/github.com/go-playground/overalls?status.svg)](https://godoc.org/github.com/go-playground/overalls)

Package overalls takes multi-package go projects, runs test coverage tests on all packages in each directory and finally concatenates into a single file for tools like goveralls.
Package overalls takes multi-package go projects, runs test coverage tests on all packages in each directory and finally concatenates into a single file for tools like goveralls and codecov.io.

Usage and documentation
------
##### Example
overalls -project=github.com/go-playground/overalls -covermode=count -debug

##### then with other tools such as goveralls
##### then with other tools such as [goveralls](https://github.com/mattn/goveralls)
goveralls -coverprofile=overalls.coverprofile -service semaphore -repotoken $COVERALLS_TOKEN

##### or [codecov.io](https://github.com/codecov/example-go)
mv overalls.coverprofile coverage.txt
export CODECOV_TOKEN=###
bash <(curl -s https://codecov.io/bash)


##### note:
1. goveralls and codecover currently do not calculate coverage the same way as `go tool cover` see [here](https://github.com/mattn/goveralls/issues/103) and [here](https://github.com/codecov/example-go/issues/13).

2. overalls (and go test) by default will not calculate coverage "across" packages. E.g. if a test in package A covers code in package B overalls will not count it. You may or may not want this depending on whether you're more concerned about unit test coverage or integration test coverage. To enable add the coverpkg flag.
`overalls -project=github.com/go-playground/overalls -covermode=count -debug -- -coverpkg=./...`

```shell
$ overalls -help
Expand Down

0 comments on commit 290b046

Please sign in to comment.