Configure the postgres server to accept local connections without password

This commit is contained in:
Jan Böhmer 2024-06-13 00:00:51 +02:00
parent d41996b365
commit 07f1ce5822

View file

@ -57,9 +57,10 @@ jobs:
run: sudo systemctl start mysql.service
if: matrix.db-type == 'mysql'
# Replace the scram-sha-256 with trust for host connections, to avoid password authentication
- name: Start PostgreSQL
run: |
sudo "echo 'host all all" >> /etc/postgresql/16/main/pg_hba.conf"
sudo sed -i 's/^\(host.*all.*all.*\)scram-sha-256/\1trust/' /etc/postgresql/14/main/pg_hba.conf
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
if: matrix.db-type == 'postgres'
@ -148,7 +149,3 @@ jobs:
if: matrix.db-type == 'mysql' && matrix.php-versions == '8.2'
env:
DATABASE_URL: mysql://root:root@localhost:3306/legacy_db
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}