1language: go
2go_import_path: github.com/jarcoal/httpmock
3
4sudo: false
5
6matrix:
7  include:
8    - go: 1.7.x
9    - go: 1.8.x
10    - go: 1.9.x
11    - go: 1.10.x
12    - go: 1.11.x
13    - go: 1.12.x
14      env:
15        - USE_LINTER=1
16      install:
17        - >
18          version=1.15.0; name=golangci-lint-$version-linux-amd64;
19          wget -q -O - https://github.com/golangci/golangci-lint/releases/download/v$version/$name.tar.gz |
20            tar -zxvf - -C $GOPATH/bin &&
21              mv $GOPATH/bin/$name/golangci-lint $GOPATH/bin
22      after_success:
23        - go get github.com/mattn/goveralls
24        - goveralls -coverprofile=coverage.out -service=travis-ci
25    - go: master
26  allow_failures:
27    - go: master
28  fast_finish: true
29
30script:
31  - export GORACE="halt_on_error=1"
32  - go test -race -covermode=atomic -coverprofile=coverage.out ./...
33  - >
34    if [ "$USE_LINTER" = 1 ]; then
35      golangci-lint run -E gofmt -E golint -E maligned -E misspell -E prealloc -E unconvert ./...;
36    fi
37
38notifications:
39  email: false
40