Skip to content

Commit

Permalink
increase num open connections in ghwf
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Jan 23, 2024
1 parent 197dda8 commit 290ec33
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
POSTGRES_DB: sac
ports:
- 5432:5432

steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -69,11 +68,15 @@ jobs:
go-version: "1.21"
- name: Install Dependencies
run: cd backend && go get ./...
- name: Wait for PostgreSQL to become ready
run: until pg_isready -h 127.0.0.1 -p 5432 -U postgres; do sleep 1; done
- name: Increase max_connections in PostgreSQL
run: |
PG_CONFIG_FILE=$(psql -U postgres -c "SHOW config_file;" -tA)
PG_CONFIG_FILE=$(psql -h 127.0.0.1 -p 5432 -U postgres -c "SHOW config_file;" -tA)
sudo sed -i "s/^#max_connections = 100/max_connections = 200/" $PG_CONFIG_FILE
sudo systemctl reload postgresql
env:
PGPASSWORD: password
- name: Migrate DB
run: cd backend/src && go run main.go --only-migrate
- name: Run Tests with Coverage
Expand Down

0 comments on commit 290ec33

Please sign in to comment.