Skip to content

Commit 5104cda

Browse files
committed
ensure postgres password is empty
1 parent 3528e83 commit 5104cda

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
4747
echo "/usr/lib/postgresql/18/bin" >> $GITHUB_PATH
4848
sudo systemctl start postgresql
49+
sudo -u postgres psql -c "ALTER USER postgres PASSWORD NULL;"
50+
PG_HBA="/etc/postgresql/18/main/pg_hba.conf" grep -q '127.0.0.1/32 trust' "$PG_HBA" ||echo "host all all 127.0.0.1/32 trust" | sudo tee -a "$PG_HBA" >/dev/null
51+
grep -q '::1/128 trust' "$PG_HBA" || echo "host all all ::1/128 trust" | sudo tee -a "$PG_HBA" >/dev/null
52+
sudo systemctl reload postgresql
4953
sudo -u postgres psql -c "SELECT version();"
5054
sudo -u postgres psql -tAc "SHOW port;"
5155
sudo -u postgres createdb golden_axe_test

0 commit comments

Comments
 (0)