Skip to content

Commit e81f250

Browse files
committed
Simplify PostgreSQL client installation to fix version compatibility
- Use postgresql-client-14 from Ubuntu repositories (stable and available) - Remove complex APT repository setup that was causing failures - PostgreSQL client 14 is compatible with all server versions (13-17 + beta) - Add psql --version verification step - Applied to both main test and beta test jobs
1 parent 704f6b4 commit e81f250

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,12 @@ jobs:
3535

3636
- name: Install PostgreSQL client
3737
run: |
38-
# Add PostgreSQL official APT repository
39-
sudo apt-get update
40-
sudo apt-get install -y wget ca-certificates
41-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
42-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
38+
# Install PostgreSQL client from Ubuntu repositories (works with all PostgreSQL versions)
4339
sudo apt-get update
40+
sudo apt-get install -y postgresql-client-common postgresql-client-14
4441
45-
# Install PostgreSQL client (will get the latest version available)
46-
sudo apt-get install -y postgresql-client-common postgresql-client
42+
# Verify installation
43+
psql --version
4744
4845
- name: Configure PostgreSQL for pg_stat_statements
4946
run: |
@@ -174,15 +171,12 @@ jobs:
174171

175172
- name: Install PostgreSQL client
176173
run: |
177-
# Add PostgreSQL official APT repository
178-
sudo apt-get update
179-
sudo apt-get install -y wget ca-certificates
180-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
181-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
174+
# Install PostgreSQL client from Ubuntu repositories (works with all PostgreSQL versions)
182175
sudo apt-get update
176+
sudo apt-get install -y postgresql-client-common postgresql-client-14
183177
184-
# Install PostgreSQL client (will get the latest version available)
185-
sudo apt-get install -y postgresql-client-common postgresql-client
178+
# Verify installation
179+
psql --version
186180
187181
- name: Configure PostgreSQL for pg_stat_statements
188182
run: |

0 commit comments

Comments
 (0)