...
1name: CI
2
3on:
4 push:
5 branches: [ master ]
6 pull_request:
7 branches: [ master ]
8
9jobs:
10
11 test:
12 name: Test
13 runs-on: ubuntu-20.04
14
15 strategy:
16 matrix:
17 go-version: [1.17, 1.18]
18 pg-version: [9.6, 10, 11, 12, 13, cockroachdb]
19 include:
20 - pg-version: 9.6
21 pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
22 pgx-test-unix-socket-conn-string: "host=/var/run/postgresql dbname=pgx_test"
23 pgx-test-tcp-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
24 pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
25 pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
26 pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
27 - pg-version: 10
28 pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
29 pgx-test-unix-socket-conn-string: "host=/var/run/postgresql dbname=pgx_test"
30 pgx-test-tcp-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
31 pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
32 pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
33 pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
34 - pg-version: 11
35 pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
36 pgx-test-unix-socket-conn-string: "host=/var/run/postgresql dbname=pgx_test"
37 pgx-test-tcp-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
38 pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
39 pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
40 pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
41 - pg-version: 12
42 pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
43 pgx-test-unix-socket-conn-string: "host=/var/run/postgresql dbname=pgx_test"
44 pgx-test-tcp-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
45 pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
46 pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
47 pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
48 - pg-version: 13
49 pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
50 pgx-test-unix-socket-conn-string: "host=/var/run/postgresql dbname=pgx_test"
51 pgx-test-tcp-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
52 pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
53 pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
54 pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
55 - pg-version: cockroachdb
56 pgx-test-conn-string: "postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
57
58 steps:
59
60 - name: Set up Go 1.x
61 uses: actions/setup-go@v2
62 with:
63 go-version: ${{ matrix.go-version }}
64
65 - name: Check out code into the Go module directory
66 uses: actions/checkout@v2
67
68 - name: Setup database server for testing
69 run: ci/setup_test.bash
70 env:
71 PGVERSION: ${{ matrix.pg-version }}
72
73 - name: Test
74 run: go test -v -race ./...
75 env:
76 PGX_TEST_CONN_STRING: ${{ matrix.pgx-test-conn-string }}
77 PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
78 PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
79 PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
80 PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
81 PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
View as plain text