Skip to content

Commit a6563aa

Browse files
committed
Fix github workflow
1 parent 87747e7 commit a6563aa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/tests.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,30 @@ jobs:
3535
- name: Set Docker containers
3636
run: docker compose up -d
3737

38+
- name: Wait for MySQL to be ready
39+
run: |
40+
echo "Waiting for MySQL to be ready..."
41+
for i in {1..30}; do
42+
if docker exec bowphp_mysql mysqladmin ping -h localhost -u root -ppassword --silent 2>/dev/null; then
43+
echo "MySQL is ready!"
44+
break
45+
fi
46+
echo "Waiting for MySQL... ($i/30)"
47+
sleep 2
48+
done
49+
50+
- name: Wait for PostgreSQL to be ready
51+
run: |
52+
echo "Waiting for PostgreSQL to be ready..."
53+
for i in {1..30}; do
54+
if docker exec bowphp_postgres pg_isready -U postgres --silent 2>/dev/null; then
55+
echo "PostgreSQL is ready!"
56+
break
57+
fi
58+
echo "Waiting for PostgreSQL... ($i/30)"
59+
sleep 2
60+
done
61+
3862
- name: Cache Composer packages
3963
id: composer-cache
4064
uses: actions/cache@v4

0 commit comments

Comments
 (0)