.travis.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. language: go
  2. sudo: false
  3. go:
  4. - master
  5. - 1.12.x
  6. - 1.11.x
  7. - 1.10.x
  8. - 1.9.x
  9. # go testing suite support, which we use, was introduced in go 1.7
  10. # testing.TB, TB.Helper() was introduced in go 1.9
  11. # Consequently, tests will only compile for go 1.9+
  12. script:
  13. - go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec
  14. - go test -tags "alltests safe" -run Suite -coverprofile coverage.safe.txt github.com/ugorji/go/codec
  15. - go test -tags "alltests codecgen" -run Suite -coverprofile coverage.codecgen.txt github.com/ugorji/go/codec
  16. # we use if block below, so that we still return with success even if skipped.
  17. # Previously, we used [[...]] && go test ..., which returned exit code 0 and broke the build.
  18. - |
  19. if [[ "${TRAVIS_GO_VERSION}" == "1.9.x" ]]; then
  20. GOARCH=386 go test -tags "alltests" -run Suite -coverprofile coverage.386.txt github.com/ugorji/go/codec
  21. fi
  22. - |
  23. if [[ "${TRAVIS_GO_VERSION}" == "1.10.x" ]]; then
  24. GOARCH=386 go test -tags "alltests safe" -run Suite -coverprofile coverage.386.safe.txt github.com/ugorji/go/codec
  25. fi
  26. - |
  27. if [[ "${TRAVIS_GO_VERSION}" == "1.11.x" ]]; then
  28. GOARCH=386 go test -tags "alltests codecgen" -run Suite -coverprofile coverage.386.codecgen.txt github.com/ugorji/go/codec
  29. fi
  30. - |
  31. if [[ "${TRAVIS_GO_VERSION}" == "1.12.x" ]]; then
  32. echo "XXXX RACE" && go test "-race" -tags "alltests" -run Suite -coverprofile coverage.race.txt github.com/ugorji/go/codec;
  33. fi
  34. after_success:
  35. - bash <(curl -s https://codecov.io/bash)