2
0
Files
pgx/.github/workflows/ci.yml
T
2021-03-06 14:42:22 -06:00

44 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.15, 1.16]
pg_version: [9.6, 10, 11, 12, 13]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup database server for testing
run: ci/setup_test.bash
env:
PGVERSION: ${{ matrix.pg_version }}
- name: Test
run: go test -v -race ./...
env:
PGX_TEST_CONN_STRING: postgres://pgx_md5:secret@127.0.0.1/pgx_test
PGX_TEST_UNIX_SOCKET_CONN_STRING: "host=/var/run/postgresql dbname=pgx_test"
PGX_TEST_TCP_CONN_STRING: postgres://pgx_md5:secret@127.0.0.1/pgx_test
PGX_TEST_TLS_CONN_STRING: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
PGX_TEST_MD5_PASSWORD_CONN_STRING: postgres://pgx_md5:secret@127.0.0.1/pgx_test
PGX_TEST_PLAIN_PASSWORD_CONN_STRING: postgres://pgx_pw:secret@127.0.0.1/pgx_test