|
1 | 1 | language: go
|
2 | 2 | sudo: false
|
3 | 3 | env:
|
4 |
| - # Turn off go module support, as the go.sum files in go/ and go/codec/ |
5 |
| - # need to be populated with their cyclic checksums, so CI's mod=readonly will not work. |
6 |
| - - GO111MODULE=off |
| 4 | + - GO111MODULE=on |
7 | 5 | branches:
|
8 | 6 | only:
|
9 | 7 | - master
|
|
14 | 12 | - 1.13.x
|
15 | 13 | - 1.12.x
|
16 | 14 | - 1.11.x
|
17 |
| - # go testing suite support, which we use, was introduced in go 1.7 |
18 |
| - # testing.TB, TB.Helper() was introduced in go 1.9 |
19 |
| - # Consequently, tests will only compile for go 1.9+ |
| 15 | + # go testing suite support was introduced in go 1.7, thus tests will only compile for go 1.7+. |
| 16 | + # Once we introduce TB.Helper() support (introduced in go 1.9), then tests will only run from go 1.9+. |
20 | 17 | script:
|
21 |
| - - go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec |
| 18 | + - go test -mod=mod -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec |
22 | 19 | - go test -tags "alltests safe" -run Suite -coverprofile coverage.safe.txt github.com/ugorji/go/codec
|
23 | 20 | - go test -tags "alltests codecgen" -run Suite -coverprofile coverage.codecgen.txt github.com/ugorji/go/codec
|
24 | 21 | # we use if block below, so that we still return with success even if skipped.
|
25 | 22 | # Previously, we used [[...]] && go test ..., which returned exit code 0 and broke the build.
|
26 | 23 | - |
|
27 | 24 | if [[ "${TRAVIS_GO_VERSION}" == "1.11.x" ]]; then
|
28 |
| - GOARCH=386 go test -tags "alltests" -run Suite -coverprofile coverage.386.txt github.com/ugorji/go/codec |
| 25 | + echo "XXX 386" && GOARCH=386 go test -tags "alltests" -run Suite -coverprofile coverage.386.txt github.com/ugorji/go/codec |
29 | 26 | fi
|
30 | 27 | - |
|
31 | 28 | if [[ "${TRAVIS_GO_VERSION}" == "1.12.x" ]]; then
|
32 |
| - GOARCH=386 go test -tags "alltests safe" -run Suite -coverprofile coverage.386.safe.txt github.com/ugorji/go/codec |
| 29 | + echo "XXX 386 safe" && GOARCH=386 go test -tags "alltests safe" -run Suite -coverprofile coverage.386.safe.txt github.com/ugorji/go/codec |
33 | 30 | fi
|
34 | 31 | - |
|
35 | 32 | if [[ "${TRAVIS_GO_VERSION}" == "1.13.x" ]]; then
|
36 |
| - GOARCH=386 go test -tags "alltests codecgen" -run Suite -coverprofile coverage.386.codecgen.txt github.com/ugorji/go/codec |
| 33 | + echo "XXX 386 codecgen" && GOARCH=386 go test -tags "alltests codecgen" -run Suite -coverprofile coverage.386.codecgen.txt github.com/ugorji/go/codec |
37 | 34 | fi
|
38 | 35 | - |
|
39 | 36 | if [[ "${TRAVIS_GO_VERSION}" == "1.14.x" ]]; then
|
40 |
| - echo "XXXX RACE notfastpath" && go test "-race" -tags "alltests notfastpath safe" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec; |
| 37 | + echo "XXX RACE notfastpath safe" && go test "-race" -tags "alltests notfastpath safe" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec; |
41 | 38 | fi
|
42 | 39 | - |
|
43 | 40 | if [[ "${TRAVIS_GO_VERSION}" == "1.15.x" ]]; then
|
44 |
| - echo "XXXX RACE" && go test "-race" -tags "alltests" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec; |
| 41 | + echo "XXX RACE" && go test "-race" -tags "alltests" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec; |
45 | 42 | fi
|
46 | 43 |
|
47 | 44 | after_success:
|
|
0 commit comments