.travis.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. language: go
  2. go:
  3. - 1.14.x
  4. - 1.15.x
  5. - master
  6. sudo: true
  7. env:
  8. global:
  9. - PGUSER=postgres
  10. - PQGOSSLTESTS=1
  11. - PQSSLCERTTEST_PATH=$PWD/certs
  12. - PGHOST=127.0.0.1
  13. - GODEBUG=x509ignoreCN=0
  14. matrix:
  15. - PGVERSION=10
  16. - PGVERSION=9.6
  17. - PGVERSION=9.5
  18. - PGVERSION=9.4
  19. before_install:
  20. - ./.travis.sh postgresql_uninstall
  21. - ./.travis.sh pgdg_repository
  22. - ./.travis.sh postgresql_install
  23. - ./.travis.sh postgresql_configure
  24. - ./.travis.sh client_configure
  25. - go get golang.org/x/tools/cmd/goimports
  26. - go get golang.org/x/lint/golint
  27. - GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@2020.1.3
  28. before_script:
  29. - createdb pqgotest
  30. - createuser -DRS pqgossltest
  31. - createuser -DRS pqgosslcert
  32. script:
  33. - >
  34. goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }'
  35. - go vet ./...
  36. - staticcheck -go 1.13 ./...
  37. - golint ./...
  38. - PQTEST_BINARY_PARAMETERS=no go test -race -v ./...
  39. - PQTEST_BINARY_PARAMETERS=yes go test -race -v ./...