.travis.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. language: go
  2. sudo: false
  3. matrix:
  4. fast_finish: true
  5. allow_failures:
  6. - go: tip
  7. go:
  8. - '1.5.x'
  9. - '1.6.x'
  10. - '1.7.x'
  11. - '1.8.x'
  12. - '1.9.x'
  13. - '1.10.x'
  14. go_import_path: gopkg.in/square/go-jose.v2
  15. before_script:
  16. - export PATH=$HOME/.local/bin:$PATH
  17. before_install:
  18. # Install encrypted gitcookies to get around bandwidth-limits
  19. # that is causing Travis-CI builds to fail. For more info, see
  20. # https://github.com/golang/go/issues/12933
  21. - openssl aes-256-cbc -K $encrypted_1528c3c2cafd_key -iv $encrypted_1528c3c2cafd_iv -in .gitcookies.sh.enc -out .gitcookies.sh -d || true
  22. - bash .gitcookies.sh || true
  23. - go get github.com/wadey/gocovmerge
  24. - go get github.com/mattn/goveralls
  25. - go get github.com/stretchr/testify/assert
  26. - go get golang.org/x/tools/cmd/cover || true
  27. - go get code.google.com/p/go.tools/cmd/cover || true
  28. - pip install cram --user
  29. script:
  30. - go test . -v -covermode=count -coverprofile=profile.cov
  31. - go test ./cipher -v -covermode=count -coverprofile=cipher/profile.cov
  32. - go test ./jwt -v -covermode=count -coverprofile=jwt/profile.cov
  33. - go test ./json -v # no coverage for forked encoding/json package
  34. - cd jose-util && go build && PATH=$PWD:$PATH cram -v jose-util.t
  35. - cd ..
  36. after_success:
  37. - gocovmerge *.cov */*.cov > merged.coverprofile
  38. - $HOME/gopath/bin/goveralls -coverprofile merged.coverprofile -service=travis-ci