mirror of https://github.com/jackc/pgx.git
Prettier ci.yml
parent
492283b90b
commit
87d771ef9c
|
@ -2,12 +2,11 @@ name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
# Note: The TLS tests are rather finicky. It seems that openssl 3 encrypts certificates differently than older
|
# Note: The TLS tests are rather finicky. It seems that openssl 3 encrypts certificates differently than older
|
||||||
|
@ -74,55 +73,54 @@ jobs:
|
||||||
pgx-test-database: "postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
|
pgx-test-database: "postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Go ${{ matrix.go-version }}
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
|
||||||
- name: Set up Go ${{ matrix.go-version }}
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/setup-go@v4
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Setup database server for testing
|
||||||
uses: actions/checkout@v3
|
run: ci/setup_test.bash
|
||||||
|
env:
|
||||||
|
PGVERSION: ${{ matrix.pg-version }}
|
||||||
|
|
||||||
- name: Setup database server for testing
|
# - name: Setup upterm session
|
||||||
run: ci/setup_test.bash
|
# uses: lhotari/action-upterm@v1
|
||||||
env:
|
# with:
|
||||||
PGVERSION: ${{ matrix.pg-version }}
|
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
|
||||||
|
# limit-access-to-actor: true
|
||||||
|
# env:
|
||||||
|
# PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
|
||||||
|
# PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
|
||||||
|
# PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
|
||||||
|
# PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
|
||||||
|
# PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
|
||||||
|
# PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
|
||||||
|
# PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
|
||||||
|
# PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
|
||||||
|
# PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
|
||||||
|
|
||||||
# - name: Setup upterm session
|
- name: Check formatting
|
||||||
# uses: lhotari/action-upterm@v1
|
run: |
|
||||||
# with:
|
gofmt -l -s -w .
|
||||||
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
|
git status
|
||||||
# limit-access-to-actor: true
|
git diff --exit-code
|
||||||
# env:
|
|
||||||
# PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
|
|
||||||
# PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
|
|
||||||
# PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
|
|
||||||
# PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
|
|
||||||
# PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
|
|
||||||
# PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
|
|
||||||
# PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
|
|
||||||
# PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
|
|
||||||
# PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
|
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Test
|
||||||
run: |
|
run: go test -v -race ./...
|
||||||
gofmt -l -s -w .
|
env:
|
||||||
git status
|
PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
|
||||||
git diff --exit-code
|
PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
|
||||||
|
PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
|
||||||
- name: Test
|
PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
|
||||||
run: go test -v -race ./...
|
PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
|
||||||
env:
|
PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
|
||||||
PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
|
# TestConnectTLS fails. However, it succeeds if I connect to the CI server with upterm and run it. Give up on that test for now.
|
||||||
PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
|
# PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
|
||||||
PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
|
PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
|
||||||
PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
|
PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
|
||||||
PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
|
|
||||||
PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
|
|
||||||
# TestConnectTLS fails. However, it succeeds if I connect to the CI server with upterm and run it. Give up on that test for now.
|
|
||||||
# PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
|
|
||||||
PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
|
|
||||||
PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
|
|
||||||
|
|
||||||
test-windows:
|
test-windows:
|
||||||
name: Test Windows
|
name: Test Windows
|
||||||
|
|
Loading…
Reference in New Issue