Skip to content

Commit 7fb3e64

Browse files
committed
tests(ci): add coverage reporting to tests and upload to coveralls.io
1 parent a7ddcdd commit 7fb3e64

File tree

4 files changed

+118
-105
lines changed

4 files changed

+118
-105
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ _cgo_export.*
2020
_testmain.go
2121

2222
*.exe
23+
24+
# coverage droppings
25+
profile.cov

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@
55
language: go
66

77
go:
8-
- 1.1.2
9-
- 1.2.1
8+
- 1.2.2
109
- tip
1110

11+
matrix:
12+
fast_finish: true
13+
1214
before_install:
15+
- go get code.google.com/p/go.tools/cmd/vet
1316
- go get -v github.com/golang/lint/golint
17+
- go get -v code.google.com/p/go.tools/cmd/cover
18+
- go get -v github.com/mattn/goveralls
1419

1520
install:
1621
- go get -d -v ./... && go build -v .
1722

1823
script:
24+
- go vet -x ./...
1925
- $HOME/gopath/bin/golint .
20-
- go test -v .
26+
- go test -covermode=count -coverprofile=profile.cov -v .
27+
28+
after_script:
29+
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ docopt-go
22
=========
33

44
[![Build Status](https://travis-ci.org/docopt/docopt.go.svg?branch=master)](https://travis-ci.org/docopt/docopt.go)
5+
[![Coverage Status](https://coveralls.io/repos/docopt/docopt.go/badge.png)](https://coveralls.io/r/docopt/docopt.go)
56
[![GoDoc](https://godoc.org/github.com/docopt/docopt.go?status.png)](https://godoc.org/github.com/docopt/docopt.go)
67

78
An implementation of [docopt](http://docopt.org/) in the

0 commit comments

Comments
 (0)