Skip to content

Commit 5847a1e

Browse files
committed
travis.yml: run with golang modules turned on
1 parent cb58fb7 commit 5847a1e

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.travis.yml

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
language: go
22
sudo: false
33
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
75
branches:
86
only:
97
- master
@@ -14,34 +12,33 @@ go:
1412
- 1.13.x
1513
- 1.12.x
1614
- 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+.
2017
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
2219
- go test -tags "alltests safe" -run Suite -coverprofile coverage.safe.txt github.com/ugorji/go/codec
2320
- go test -tags "alltests codecgen" -run Suite -coverprofile coverage.codecgen.txt github.com/ugorji/go/codec
2421
# we use if block below, so that we still return with success even if skipped.
2522
# Previously, we used [[...]] && go test ..., which returned exit code 0 and broke the build.
2623
- |
2724
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
2926
fi
3027
- |
3128
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
3330
fi
3431
- |
3532
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
3734
fi
3835
- |
3936
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;
4138
fi
4239
- |
4340
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;
4542
fi
4643
4744
after_success:

0 commit comments

Comments
 (0)