Skip to content

Commit b958aec

Browse files
committed
fix: Add logging to PostgreSQL readiness check in CI workflow
1 parent 50ddd47 commit b958aec

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ jobs:
4040
- name: Generate Prisma Client
4141
run: bunx prisma generate
4242

43+
- name: Wait for PostgreSQL
44+
run: |
45+
until pg_isready -h localhost -p 5432 -U postgres; do
46+
echo "Waiting for postgres..."
47+
sleep 2
48+
done
49+
4350
- name: Push schema to database
4451
run: bunx prisma db push
4552
env:

tests/setup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export const receivedNotifications: Record<string, any[]> = {
2727
// No pg-testdb required - keep it simple!
2828
beforeAll(async () => {
2929
console.log('Setting up test environment...');
30+
console.log('Environment variables:');
31+
console.log('DATABASE_URL:', process.env.DATABASE_URL);
32+
console.log('TEST_DATABASE_URL:', process.env.TEST_DATABASE_URL);
3033

3134
try {
3235
// Use environment variables for connection or fallback to defaults

0 commit comments

Comments
 (0)