File tree Expand file tree Collapse file tree 5 files changed +41
-39
lines changed
actions/setup-postgres-macos Expand file tree Collapse file tree 5 files changed +41
-39
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -284,7 +284,12 @@ jobs:
284284
285285 - name : Set up postgres (macos)
286286 if : runner.os == 'macOS'
287- uses : ./.github/actions/setup-postgres-macos
287+
288+ uses : nick-fields/retry@v3
289+ with :
290+ timeout_minutes : 10
291+ max_attempts : 3
292+ command : ./test/setup_db.sh
288293
289294 - name : Set up postgres (windows)
290295 if : runner.os == 'Windows'
Original file line number Diff line number Diff line change 9999 run : make setup-db
100100
101101 # mac and windows don't use make due to limitations with docker with those runners in GitHub
102- - name : " Set up postgres (macos)"
103- if : inputs.os == 'macos-14'
104- uses : ./.github/actions/setup-postgres-macos
102+ - name : Set up postgres (macos)
103+ if : runner.os == 'macOS'
104+ uses : nick-fields/retry@v3
105+ with :
106+ timeout_minutes : 10
107+ max_attempts : 3
108+ command : ./test/setup_db.sh
105109
106110 - name : " Set up postgres (windows)"
107111 if : inputs.os == 'windows-latest'
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -x
3+
4+ brew install postgresql@16
5+ brew link postgresql@16 --force
6+
7+ # Add the services tap and ensure PATH is updated
8+ brew tap homebrew/services
9+ export PATH=" /opt/homebrew/opt/postgresql@16/bin:$PATH "
10+
11+ # Start PostgreSQL using the full command instead of brew services
12+ pg_ctl -D /opt/homebrew/var/postgresql@16 start
13+
14+ echo " Check PostgreSQL service is running"
15+ i=10
16+ COMMAND=' pg_isready'
17+ while [ $i -gt -1 ]; do
18+ if [ $i == 0 ]; then
19+ echo " PostgreSQL service not ready, all attempts exhausted"
20+ exit 1
21+ fi
22+ echo " Check PostgreSQL service status"
23+ eval $COMMAND && break
24+ echo " PostgreSQL service not ready, wait 10 more sec, attempts left: $i "
25+ sleep 10
26+ (( i-- ))
27+ done
28+
29+ createuser -s postgres
30+
331env | grep ' ^PG'
432
533# If you want to run this script for your own postgresql (run with
You can’t perform that action at this time.
0 commit comments