-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (49 loc) · 2.28 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
44
45
46
47
48
49
50
language: go
env:
- GO111MODULE=on
branches:
only:
- master
go:
- master
- 1.16.x
- 1.15.x
- 1.14.x
- 1.13.x
- 1.12.x
- 1.11.x
# go testing suite support was introduced in go 1.7, thus tests will only compile for go 1.7+.
# Once we introduce TB.Helper() support (introduced in go 1.9), then tests will only run from go 1.9+.
install:
- go get github.com/ugorji/go/codec@master
# explicitly request master, so we test changes at tip (and not the latest released version/tag)
# also, by explicitly requesting master, we don't have to request -mod=mod or otherwise
script:
- go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec
- go test -tags "alltests safe" -run Suite -coverprofile coverage.safe.txt github.com/ugorji/go/codec
- go test -tags "alltests notfastpath safe" -run Suite -coverprofile coverage.notfastpath.safe.txt github.com/ugorji/go/codec
- go test -tags "alltests codecgen" -run Suite -coverprofile coverage.codecgen.txt github.com/ugorji/go/codec
# we use if block below, so that we still return with success even if skipped.
# Previously, we used [[...]] && go test ..., which returned exit code 0 and broke the build.
- |
if [[ "${TRAVIS_GO_VERSION}" == "1.12.x" ]]; then
echo "XXX 386" && GOARCH=386 go test -tags "alltests" -run Suite -coverprofile coverage.386.txt github.com/ugorji/go/codec
fi
- |
if [[ "${TRAVIS_GO_VERSION}" == "1.13.x" ]]; then
echo "XXX 386 safe" && GOARCH=386 go test -tags "alltests safe" -run Suite -coverprofile coverage.386.safe.txt github.com/ugorji/go/codec
fi
- |
if [[ "${TRAVIS_GO_VERSION}" == "1.14.x" ]]; then
echo "XXX 386 codecgen" && GOARCH=386 go test -tags "alltests codecgen" -run Suite -coverprofile coverage.386.codecgen.txt github.com/ugorji/go/codec
fi
- |
if [[ "${TRAVIS_GO_VERSION}" == "1.15.x" ]]; then
echo "XXX RACE notfastpath safe" && go test "-race" -tags "alltests notfastpath safe" -run Suite -coverprofile coverage.race.notfastpath.safe.txt github.com/ugorji/go/codec
fi
- |
if [[ "${TRAVIS_GO_VERSION}" == "1.16.x" ]]; then
echo "XXX RACE" && go test "-race" -tags "alltests" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec
fi
after_success:
- bash <(curl -s https://codecov.io/bash)