@@ -2,12 +2,11 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [master]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [master]
8
8
9
9
jobs :
10
-
11
10
test :
12
11
name : Test
13
12
# Note: The TLS tests are rather finicky. It seems that openssl 3 encrypts certificates differently than older
@@ -74,55 +73,54 @@ jobs:
74
73
pgx-test-database : " postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
75
74
76
75
steps :
76
+ - name : Set up Go ${{ matrix.go-version }}
77
+ uses : actions/setup-go@v4
78
+ with :
79
+ go-version : ${{ matrix.go-version }}
77
80
78
- - name : Set up Go ${{ matrix.go-version }}
79
- uses : actions/setup-go@v4
80
- with :
81
- go-version : ${{ matrix.go-version }}
82
-
83
- - name : Check out code into the Go module directory
84
- uses : actions/checkout@v3
85
-
86
- - name : Setup database server for testing
87
- run : ci/setup_test.bash
88
- env :
89
- PGVERSION : ${{ matrix.pg-version }}
90
-
91
- # - name: Setup upterm session
92
- # uses: lhotari/action-upterm@v1
93
- # with:
94
- # ## limits ssh access and adds the ssh public key for the user which triggered the workflow
95
- # limit-access-to-actor: true
96
- # env:
97
- # PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
98
- # PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
99
- # PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
100
- # PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
101
- # PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
102
- # PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
103
- # PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
104
- # PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
105
- # PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
81
+ - name : Check out code into the Go module directory
82
+ uses : actions/checkout@v3
106
83
107
- - name : Check formatting
108
- run : |
109
- gofmt -l -s -w .
110
- git status
111
- git diff --exit-code
84
+ - name : Setup database server for testing
85
+ run : ci/setup_test.bash
86
+ env :
87
+ PGVERSION : ${{ matrix.pg-version }}
88
+
89
+ # - name: Setup upterm session
90
+ # uses: lhotari/action-upterm@v1
91
+ # with:
92
+ # ## limits ssh access and adds the ssh public key for the user which triggered the workflow
93
+ # limit-access-to-actor: true
94
+ # env:
95
+ # PGX_TEST_DATABASE: ${{ matrix.pgx-test-database }}
96
+ # PGX_TEST_UNIX_SOCKET_CONN_STRING: ${{ matrix.pgx-test-unix-socket-conn-string }}
97
+ # PGX_TEST_TCP_CONN_STRING: ${{ matrix.pgx-test-tcp-conn-string }}
98
+ # PGX_TEST_SCRAM_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-scram-password-conn-string }}
99
+ # PGX_TEST_MD5_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-md5-password-conn-string }}
100
+ # PGX_TEST_PLAIN_PASSWORD_CONN_STRING: ${{ matrix.pgx-test-plain-password-conn-string }}
101
+ # PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
102
+ # PGX_SSL_PASSWORD: ${{ matrix.pgx-ssl-password }}
103
+ # PGX_TEST_TLS_CLIENT_CONN_STRING: ${{ matrix.pgx-test-tls-client-conn-string }}
104
+
105
+ - name : Check formatting
106
+ run : |
107
+ gofmt -l -s -w .
108
+ git status
109
+ git diff --exit-code
112
110
113
- - name : Test
114
- run : go test -v -race ./...
115
- env :
116
- PGX_TEST_DATABASE : ${{ matrix.pgx-test-database }}
117
- PGX_TEST_UNIX_SOCKET_CONN_STRING : ${{ matrix.pgx-test-unix-socket-conn-string }}
118
- PGX_TEST_TCP_CONN_STRING : ${{ matrix.pgx-test-tcp-conn-string }}
119
- PGX_TEST_SCRAM_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-scram-password-conn-string }}
120
- PGX_TEST_MD5_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-md5-password-conn-string }}
121
- PGX_TEST_PLAIN_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-plain-password-conn-string }}
122
- # TestConnectTLS fails. However, it succeeds if I connect to the CI server with upterm and run it. Give up on that test for now.
123
- # PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
124
- PGX_SSL_PASSWORD : ${{ matrix.pgx-ssl-password }}
125
- PGX_TEST_TLS_CLIENT_CONN_STRING : ${{ matrix.pgx-test-tls-client-conn-string }}
111
+ - name : Test
112
+ run : go test -v -race ./...
113
+ env :
114
+ PGX_TEST_DATABASE : ${{ matrix.pgx-test-database }}
115
+ PGX_TEST_UNIX_SOCKET_CONN_STRING : ${{ matrix.pgx-test-unix-socket-conn-string }}
116
+ PGX_TEST_TCP_CONN_STRING : ${{ matrix.pgx-test-tcp-conn-string }}
117
+ PGX_TEST_SCRAM_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-scram-password-conn-string }}
118
+ PGX_TEST_MD5_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-md5-password-conn-string }}
119
+ PGX_TEST_PLAIN_PASSWORD_CONN_STRING : ${{ matrix.pgx-test-plain-password-conn-string }}
120
+ # TestConnectTLS fails. However, it succeeds if I connect to the CI server with upterm and run it. Give up on that test for now.
121
+ # PGX_TEST_TLS_CONN_STRING: ${{ matrix.pgx-test-tls-conn-string }}
122
+ PGX_SSL_PASSWORD : ${{ matrix.pgx-ssl-password }}
123
+ PGX_TEST_TLS_CLIENT_CONN_STRING : ${{ matrix.pgx-test-tls-client-conn-string }}
126
124
127
125
test-windows :
128
126
name : Test Windows
@@ -156,4 +154,4 @@ jobs:
156
154
- name : Test
157
155
run : go test -v -race ./...
158
156
env :
159
- PGX_TEST_DATABASE : ${{ steps.postgres.outputs.connection-uri }}
157
+ PGX_TEST_DATABASE : ${{ steps.postgres.outputs.connection-uri }}
0 commit comments