.travis.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. language: go
  2. go:
  3. - 1.9.x
  4. - 1.10.x
  5. - 1.11.x
  6. - master
  7. sudo: true
  8. env:
  9. global:
  10. - PGUSER=postgres
  11. - PQGOSSLTESTS=1
  12. - PQSSLCERTTEST_PATH=$PWD/certs
  13. - PGHOST=127.0.0.1
  14. - MEGACHECK_VERSION=2017.2.2
  15. matrix:
  16. - PGVERSION=10
  17. - PGVERSION=9.6
  18. - PGVERSION=9.5
  19. - PGVERSION=9.4
  20. - PGVERSION=9.3
  21. - PGVERSION=9.2
  22. - PGVERSION=9.1
  23. - PGVERSION=9.0
  24. before_install:
  25. - ./.travis.sh postgresql_uninstall
  26. - ./.travis.sh pgdg_repository
  27. - ./.travis.sh postgresql_install
  28. - ./.travis.sh postgresql_configure
  29. - ./.travis.sh client_configure
  30. - ./.travis.sh megacheck_install
  31. - ./.travis.sh golint_install
  32. - go get golang.org/x/tools/cmd/goimports
  33. before_script:
  34. - createdb pqgotest
  35. - createuser -DRS pqgossltest
  36. - createuser -DRS pqgosslcert
  37. script:
  38. - >
  39. goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }'
  40. - go vet ./...
  41. - megacheck -go 1.9 ./...
  42. - golint ./...
  43. - PQTEST_BINARY_PARAMETERS=no go test -race -v ./...
  44. - PQTEST_BINARY_PARAMETERS=yes go test -race -v ./...