Skip to content

Commit 1075fe7

Browse files
committed
[tmp] io method sync
1 parent de8f501 commit 1075fe7

File tree

3 files changed

+43
-15
lines changed

3 files changed

+43
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,6 @@ jobs:
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

docker-compose.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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

docker/postgres18-sync/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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"]

0 commit comments

Comments
 (0)