2019-03-27 19:15:23 +08:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2020-06-16 19:57:38 +08:00
|
|
|
- 1.14.x
|
2020-09-18 22:38:46 +08:00
|
|
|
- 1.15.x
|
2021-08-28 19:15:21 +08:00
|
|
|
- 1.16.x
|
2019-03-27 19:15:23 +08:00
|
|
|
|
|
|
|
sudo: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- PGUSER=postgres
|
|
|
|
- PQGOSSLTESTS=1
|
|
|
|
- PQSSLCERTTEST_PATH=$PWD/certs
|
|
|
|
- PGHOST=127.0.0.1
|
2020-09-18 22:38:46 +08:00
|
|
|
- GODEBUG=x509ignoreCN=0
|
2019-03-27 19:15:23 +08:00
|
|
|
matrix:
|
|
|
|
- PGVERSION=10
|
|
|
|
- PGVERSION=9.6
|
|
|
|
- PGVERSION=9.5
|
|
|
|
- PGVERSION=9.4
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- ./.travis.sh postgresql_uninstall
|
|
|
|
- ./.travis.sh pgdg_repository
|
|
|
|
- ./.travis.sh postgresql_install
|
|
|
|
- ./.travis.sh postgresql_configure
|
|
|
|
- ./.travis.sh client_configure
|
|
|
|
- go get golang.org/x/tools/cmd/goimports
|
2019-08-24 00:40:30 +08:00
|
|
|
- go get golang.org/x/lint/golint
|
2020-06-16 19:57:38 +08:00
|
|
|
- GO111MODULE=on go get honnef.co/go/tools/cmd/staticcheck@2020.1.3
|
2019-03-27 19:15:23 +08:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- createdb pqgotest
|
|
|
|
- createuser -DRS pqgossltest
|
|
|
|
- createuser -DRS pqgosslcert
|
|
|
|
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }'
|
|
|
|
- go vet ./...
|
2020-06-16 19:57:38 +08:00
|
|
|
- staticcheck -go 1.13 ./...
|
2019-03-27 19:15:23 +08:00
|
|
|
- golint ./...
|
|
|
|
- PQTEST_BINARY_PARAMETERS=no go test -race -v ./...
|
|
|
|
- PQTEST_BINARY_PARAMETERS=yes go test -race -v ./...
|