File tree Expand file tree Collapse file tree 3 files changed +43
-15
lines changed Expand file tree Collapse file tree 3 files changed +43
-15
lines changed Original file line number Diff line number Diff line change 7676 integration-tests-postgres :
7777 name : PostgreSQL integration tests
7878 needs : tests
79- services :
80- postgres :
81- image : postgres:18
82- ports :
83- - 5432
84- env :
85- POSTGRES_PASSWORD : postgres
86- POSTGRES_DB : testdb
87- options : >-
88- --health-cmd pg_isready
89- --health-interval 10s
90- --health-timeout 5s
91- --health-retries 5
92- --tmpfs /var/lib/postgres
9379 runs-on : " ubuntu-24.04"
9480 timeout-minutes : 60
9581
@@ -102,7 +88,25 @@ jobs:
10288 - ' 8.1'
10389
10490 steps :
105- - uses : actions/checkout@v2
91+ - uses : actions/checkout@v4
92+
93+ - name : Set up Docker Buildx
94+ uses : docker/setup-buildx-action@v3
95+
96+ - name : Build and start Postgres (io_method=sync) with Docker Compose
97+ run : |
98+ docker compose -f docker-compose.yml up -d --build postgres
99+
100+ - name : Wait for Postgres to be healthy
101+ run : |
102+ for i in {1..10}; do
103+ if docker exec postgres18rc1-sync pg_isready -U postgres; then
104+ exit 0
105+ fi
106+ echo "Waiting for Postgres..."
107+ sleep 5
108+ done
109+ exit 1
106110
107111 - name : Setup PHP Action
108112 uses : shivammathur/setup-php@v2
Original file line number Diff line number Diff line change 1+ # version: "3.8"
2+
3+ services :
4+ postgres :
5+ build :
6+ context : ./docker/postgres18-sync
7+ container_name : postgres18rc1-sync
8+ environment :
9+ POSTGRES_PASSWORD : postgres
10+ POSTGRES_DB : testdb
11+ ports :
12+ - " 5432:5432"
13+ healthcheck :
14+ test : ["CMD-SHELL", "pg_isready -U postgres"]
15+ interval : 10s
16+ timeout : 5s
17+ retries : 5
18+ tmpfs :
19+ - /var/lib/postgresql
Original file line number Diff line number Diff line change 1+ # Start from the official PostgreSQL 18 RC1 image
2+ FROM postgres:18rc1
3+
4+ # Override the default CMD so that io_method=sync is always enabled
5+ CMD ["postgres" , "-c" , "io_method=sync" ]
You can’t perform that action at this time.
0 commit comments