aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/lib/pq/.travis.yml
blob: 4e34e8857ca34b944faaae7e7281a47c30928157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
language: go

go:
  - 1.5.x
  - 1.6.x
  - 1.7.x
  - 1.8.x
  - 1.9.x
  - master

sudo: true

env:
  global:
    - PGUSER=postgres
    - PQGOSSLTESTS=1
    - PQSSLCERTTEST_PATH=$PWD/certs
    - PGHOST=127.0.0.1
    - MEGACHECK_VERSION=2017.2.1
  matrix:
    - PGVERSION=10
    - PGVERSION=9.6
    - 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
  - ./.travis.sh megacheck_install
  - ./.travis.sh golint_install
  - 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 ./...
    # For compatibility with Go 1.5, launch only if megacheck is present.
  - >
    which megacheck > /dev/null && megacheck -go 1.5 ./...
    || echo 'megacheck is not supported, skipping check'
    # For compatibility with Go 1.5, launch only if golint is present.
  - >
    which golint > /dev/null && golint ./...
    || echo 'golint is not supported, skipping check'
  - PQTEST_BINARY_PARAMETERS=no  go test -race -v ./...
  - PQTEST_BINARY_PARAMETERS=yes go test -race -v ./...