language: go

go:
  - 1.4
  - 1.5
  - 1.6
  - tip

env:
  global:
    - PGUSER=postgres
    - PQGOSSLTESTS=1
    - PQSSLCERTTEST_PATH=$PWD/certs
    - PGHOST=127.0.0.1
  matrix:
    - PGVERSION=9.5 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.4 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.3 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.2 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.1 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.0 PQTEST_BINARY_PARAMETERS=yes
    - PGVERSION=9.5 PQTEST_BINARY_PARAMETERS=no
    - PGVERSION=9.4 PQTEST_BINARY_PARAMETERS=no
    - PGVERSION=9.3 PQTEST_BINARY_PARAMETERS=no
    - PGVERSION=9.2 PQTEST_BINARY_PARAMETERS=no
    - PGVERSION=9.1 PQTEST_BINARY_PARAMETERS=no
    - PGVERSION=9.0 PQTEST_BINARY_PARAMETERS=no

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

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 ./...
  - go test -v ./...

language: go

go:
  - 1.4
  - 1.5
  - 1.6
  - tip

env:
  global:
    - PGUSER=postgres
    - PQGOSSLTESTS=1
    - PQSSLCERTTEST_PATH=$PWD/certs
    - PGHOST=127.0.0.1
  matrix:
    - PGVERSION=9.5
    - PGVERSION=9.4
    - PGVERSION=9.3
    - PGVERSION=9.2
    - PGVERSION=9.1
    - PGVERSION=9.0

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

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 ./...
  - PQTEST_BINARY_PARAMETERS=no  go test -v ./...
  - PQTEST_BINARY_PARAMETERS=yes go test -v ./...

Use the matrix only for installation of Go and PostgreSQL
Use the matrix only for installation of Go and PostgreSQL
