forked from spyzhov/ajson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (35 loc) · 1.18 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
33
34
35
36
37
38
39
40
41
42
43
# This is a weird way of telling Travis to use the fast container-based test
# runner instead of the slow VM-based runner.
sudo: false
language: go
# You don't need to test on very old version of the Go compiler. It's the user's
# responsibility to keep their compilers up to date.
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x
- 1.17.x
env:
- GO111MODULE=on
# Only clone the most recent commit.
git:
depth: 1
# Skip the install step. Don't `go get` dependencies. Only build with the code
# in vendor/
install: true
# Don't email me the results of the test runs.
notifications:
email: false
# Anything in before_script that returns a nonzero exit code will flunk the
# build and immediately stop. It's sorta like having set -e enabled in bash.
before_script:
- go get golang.org/x/tools/cmd/cover # coveralls.io
- go get github.com/mattn/goveralls # coveralls.io
script:
- go test -race ./... # Run all the tests with the race detector enabled
- go test -covermode=count -coverprofile=coverage.out # coveralls.io
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN # coveralls.io
- go test -bench=. -cpu=1