33
33
34
34
services :
35
35
mysql :
36
- image : mysql:5.7
36
+ image : mysql:8
37
37
ports :
38
38
- 3306
39
39
56
56
with :
57
57
ruby-version : ${{ matrix.ruby-version }}
58
58
bundler-cache : true # runs 'bundle install' and caches installed gems automatically
59
+ - name : Setup gdiff
60
+ run : |
61
+ sudo ln -s /usr/bin/diff /usr/bin/gdiff || true
59
62
- name : Setup database
60
63
run : |
61
64
sudo service mysql start
@@ -89,10 +92,10 @@ jobs:
89
92
90
93
services :
91
94
postgres :
92
- image : postgres:11
95
+ image : postgres:17
93
96
env :
94
97
POSTGRES_PASSWORD : postgres
95
- POSTGRES_HOST_AUTH_METHOD : trust
98
+ POSTGRES_DB : postgres
96
99
ports :
97
100
- 5432:5432
98
101
options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
@@ -104,7 +107,8 @@ jobs:
104
107
PREPARED_STATEMENTS : ${{ matrix.prepared_statements }}
105
108
PGHOST : localhost
106
109
PGPORT : 5432
107
- PGUSER : postgres
110
+ PGUSER : arjdbc
111
+ PGPASSWORD : arjdbc
108
112
109
113
steps :
110
114
- uses : actions/checkout@v4
@@ -118,10 +122,23 @@ jobs:
118
122
with :
119
123
ruby-version : ${{ matrix.ruby-version }}
120
124
bundler-cache : true # runs 'bundle install' and caches installed gems automatically
125
+ - name : Install PostgreSQL 17 client
126
+ run : |
127
+ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
128
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
129
+ sudo apt-get update
130
+ sudo apt-get install -y postgresql-client-17
131
+ - name : Setup gdiff
132
+ run : |
133
+ sudo ln -s /usr/bin/diff /usr/bin/gdiff || true
121
134
- name : Setup database
122
135
run : |
123
- psql -c "create database activerecord_unittest;" -U postgres
124
- psql -c "create database activerecord_unittest2;" -U postgres
136
+ PGPASSWORD=postgres psql -h localhost -U postgres -c "CREATE USER arjdbc WITH SUPERUSER CREATEDB LOGIN PASSWORD 'arjdbc';"
137
+ echo "Testing connection as arjdbc user..."
138
+ PGPASSWORD=arjdbc psql -h localhost -d postgres -U arjdbc -c '\l'
139
+ echo "Exit status: $?"
140
+ PGPASSWORD=arjdbc psql -h localhost -d postgres -c "create database activerecord_unittest;" -U arjdbc
141
+ PGPASSWORD=arjdbc psql -h localhost -d postgres -c "create database activerecord_unittest2;" -U arjdbc
125
142
- name : Build
126
143
run : |
127
144
rake jar # compiles ext generates: lib/arjdbc/jdbc/adapter_java.jar
@@ -158,6 +175,9 @@ jobs:
158
175
with :
159
176
ruby-version : ${{ matrix.ruby-version }}
160
177
bundler-cache : true # runs 'bundle install' and caches installed gems automatically
178
+ - name : Setup gdiff
179
+ run : |
180
+ sudo ln -s /usr/bin/diff /usr/bin/gdiff || true
161
181
- name : Build
162
182
run : |
163
183
echo "JAVA_OPTS=$JAVA_OPTS"
@@ -181,7 +201,7 @@ jobs:
181
201
182
202
services :
183
203
mysql :
184
- image : mysql:5.7
204
+ image : mysql:8
185
205
ports :
186
206
- 3306
187
207
@@ -231,10 +251,10 @@ jobs:
231
251
232
252
services :
233
253
postgres :
234
- image : postgres:11
254
+ image : postgres:17
235
255
env :
236
256
POSTGRES_PASSWORD : postgres
237
- POSTGRES_HOST_AUTH_METHOD : trust
257
+ POSTGRES_DB : postgres
238
258
ports :
239
259
- 5432:5432
240
260
options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
@@ -247,7 +267,8 @@ jobs:
247
267
INSERT_RETURNING : ${{ matrix.insert_returning }}
248
268
PGHOST : localhost
249
269
PGPORT : 5432
250
- PGUSER : postgres
270
+ PGUSER : arjdbc
271
+ PGPASSWORD : arjdbc
251
272
252
273
steps :
253
274
- uses : actions/checkout@v4
@@ -261,6 +282,20 @@ jobs:
261
282
with :
262
283
ruby-version : ${{ matrix.ruby-version }}
263
284
bundler-cache : true # runs 'bundle install' and caches installed gems automatically
285
+ - name : Install PostgreSQL 17 client
286
+ run : |
287
+ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
288
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
289
+ sudo apt-get update
290
+ sudo apt-get install -y postgresql-client-17
291
+ - name : Setup PostgreSQL user
292
+ run : |
293
+ PGPASSWORD=postgres psql -h localhost -U postgres -c "CREATE USER arjdbc WITH SUPERUSER CREATEDB LOGIN PASSWORD 'arjdbc';"
294
+ - name : Test PostgreSQL connection
295
+ run : |
296
+ echo "Testing connection as arjdbc user..."
297
+ PGPASSWORD=arjdbc psql -h localhost -d postgres -U arjdbc -c '\l'
298
+ echo "Exit status: $?"
264
299
- name : Build
265
300
run : |
266
301
rake jar
0 commit comments