Skip to content

Commit

Permalink
add coveralls support to travis config
Browse files Browse the repository at this point in the history
based on instructions at
https://coveralls.zendesk.com/hc/en-us/articles/201342809-Go

also remove drone.io badge from README.md, since it looks like the
service is no more.

Fixes #694
  • Loading branch information
willnorris committed Aug 15, 2017
1 parent 6afafa8 commit 0edffa0
Show file tree
Hide file tree
Showing 3 changed files with 5,174 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ matrix:
allow_failures:
- go: master
fast_finish: true
env:
secure: "IrnPmy/rkIP6Nrbqji+u7MCAibQlA6WvPLEllmDQ2yZP/uIe3wLwwYbTu9BOkgzoLA+f8PA6u3pp/RhY/rtaM4NzHAO2nVfGIv9UHUQ3NGq0DYS6rODjVKhq7vkhELoagRewyqFVN4rE0LnExkknRMgjQfRke6/DA7u7Xm8JyhY=" # COVERALLS_TOKEN
install:
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- # Do not install go-github yet, since we want it to happen inside the script step.
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .)
- go generate -x ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code) # Check that go generate ./... produces a zero diff; clean up any changes afterwards.
- go tool vet .
- go test -v -race ./...
- go test -v -tags=integration -run=^$ ./test/integration # Check that integration test builds successfully, but don't run any of the tests (they hit live GitHub API).
- go test -v -covermode=count -coverprofile=coverage.out ./github
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go-github is a Go client library for accessing the [GitHub API][].
**Documentation:** [![GoDoc](https://godoc.org/github.com/google/go-github/github?status.svg)](https://godoc.org/github.com/google/go-github/github)
**Mailing List:** [go-github@googlegroups.com](https://groups.google.com/group/go-github)
**Build Status:** [![Build Status](https://travis-ci.org/google/go-github.svg?branch=master)](https://travis-ci.org/google/go-github)
**Test Coverage:** [![Test Coverage](https://coveralls.io/repos/google/go-github/badge.svg?branch=master)](https://coveralls.io/r/google/go-github?branch=master) ([gocov report](https://drone.io/github.com/google/go-github/files/coverage.html))
**Test Coverage:** [![Test Coverage](https://coveralls.io/repos/google/go-github/badge.svg?branch=master)](https://coveralls.io/r/google/go-github?branch=master)

go-github requires Go version 1.7 or greater.

Expand Down
Loading

0 comments on commit 0edffa0

Please sign in to comment.