forked from google/go-github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (31 loc) · 1.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
sudo: false
language: go
go:
- "1.11.x"
- "1.10.x"
- "1.9.x"
- master
env:
global:
- GO111MODULE=on
matrix:
allow_failures:
- go: master
fast_finish: true
env:
secure: "IrnPmy/rkIP6Nrbqji+u7MCAibQlA6WvPLEllmDQ2yZP/uIe3wLwwYbTu9BOkgzoLA+f8PA6u3pp/RhY/rtaM4NzHAO2nVfGIv9UHUQ3NGq0DYS6rODjVKhq7vkhELoagRewyqFVN4rE0LnExkknRMgjQfRke6/DA7u7Xm8JyhY=" # COVERALLS_TOKEN
install:
- 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).
# Generate test coverage report. This must be after all other tests.
#- rm github/github-accessors.go # exclude generated code
#- go test -v -covermode=count -coverprofile=coverage.out ./github
#- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN