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
|
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [1.17, 1.18]
pg-version: [10, 11, 12, 13, 14, cockroachdb]
include:
- pg-version: 10
pgx-test-database: postgres://pgx_md5:secret@127.0.0.1/pgx_test
- pg-version: 11
pgx-test-database: postgres://pgx_md5:secret@127.0.0.1/pgx_test
- pg-version: 12
pgx-test-database: postgres://pgx_md5:secret@127.0.0.1/pgx_test
- pg-version: 13
pgx-test-database: postgres://pgx_md5:secret@127.0.0.1/pgx_test
- pg-version: 14
pgx-test-database: postgres://pgx_md5:secret@127.0.0.1/pgx_test
- pg-version: cockroachdb
pgx-test-database: "postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
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 -race ./...
env:
PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
|