Skip to content

Commit e9673ee

Browse files
committed
test fix 1'
1 parent 328f4b4 commit e9673ee

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11-
container: pyramation/node-sqitch:20.12.0
1211
continue-on-error: true
1312
strategy:
1413
fail-fast: false
@@ -18,24 +17,11 @@ jobs:
1817
- rls-demo
1918

2019
env:
21-
PGHOST: pg_db
22-
PGPORT: 5432
23-
PGUSER: supabase_admin
20+
PGHOST: 127.0.0.1
21+
PGPORT: 54322
22+
PGUSER: postgres
2423
PGPASSWORD: postgres
25-
26-
services:
27-
pg_db:
28-
image: public.ecr.aws/supabase/postgres:17.6.1.029
29-
env:
30-
POSTGRES_USER: supabase_admin
31-
POSTGRES_PASSWORD: postgres
32-
options: >-
33-
--health-cmd pg_isready
34-
--health-interval 10s
35-
--health-timeout 5s
36-
--health-retries 5
37-
ports:
38-
- 5432:5432
24+
DATABASE_URL: "postgresql://postgres:[email protected]:54322/postgres"
3925

4026
steps:
4127
- name: Configure Git (for tests)
@@ -46,6 +32,38 @@ jobs:
4632
- name: Checkout
4733
uses: actions/checkout@v4
4834

35+
- name: Setup Supabase CLI
36+
uses: supabase/setup-cli@v1
37+
with:
38+
version: latest
39+
40+
- name: Initialize Supabase (if needed)
41+
run: test -d supabase || supabase init
42+
43+
- name: Start Supabase stack
44+
run: supabase start
45+
46+
- name: Show Supabase status
47+
run: supabase status
48+
49+
- name: Install Postgres client
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y postgresql-client
53+
54+
- name: Wait for Postgres
55+
run: |
56+
for i in {1..60}; do
57+
if pg_isready -h 127.0.0.1 -p 54322 -U postgres; then
58+
exit 0
59+
fi
60+
sleep 2
61+
done
62+
echo "postgres not ready in time"
63+
docker ps
64+
supabase status
65+
exit 1
66+
4967
- name: Enable corepack and pnpm
5068
run: |
5169
corepack enable
@@ -67,9 +85,9 @@ jobs:
6785
# lql admin-users bootstrap --yes
6886
# lql admin-users add --test --yes
6987
# env:
70-
# PGHOST: pg_db
71-
# PGPORT: 5432
72-
# PGUSER: supabase_admin
88+
# PGHOST: 127.0.0.1
89+
# PGPORT: 54322
90+
# PGUSER: postgres
7391
# PGPASSWORD: postgres
7492

7593
- name: Test ${{ matrix.package }}

0 commit comments

Comments
 (0)