Skip to content

Commit

Permalink
Configure the postgres server to accept local connections without pas…
Browse files Browse the repository at this point in the history
…sword
  • Loading branch information
jbtronics committed Jun 12, 2024
1 parent d41996b commit 07f1ce5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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() }}

0 comments on commit 07f1ce5

Please sign in to comment.