Skip to content

Commit 9d90054

Browse files
committed
GitHub Actions: Wait for MySQL to start
1 parent 35bd28d commit 9d90054

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ jobs:
8080
- name: "Install dependencies with composer"
8181
run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
8282

83+
- name: Wait for MySQL
84+
run: |
85+
while ! mysqladmin ping --host=127.0.0.1 --silent; do
86+
sleep 1
87+
done
88+
8389
- name: "Run PHPUnit"
8490
run: "vendor/bin/phpunit --no-coverage"
8591

@@ -124,6 +130,12 @@ jobs:
124130
- name: "Install dependencies with composer"
125131
run: "composer install --no-interaction --no-progress --no-suggest"
126132

133+
- name: Wait for MySQL
134+
run: |
135+
while ! mysqladmin ping --host=127.0.0.1 --silent; do
136+
sleep 1
137+
done
138+
127139
- name: "Run PHPUnit"
128140
run: "vendor/bin/phpunit"
129141

@@ -170,5 +182,11 @@ jobs:
170182
- name: "Install dependencies with composer"
171183
run: "composer install --no-interaction --no-progress --no-suggest"
172184

185+
- name: Wait for MySQL
186+
run: |
187+
while ! mysqladmin ping --host=127.0.0.1 --silent; do
188+
sleep 1
189+
done
190+
173191
- name: "Run PHPUnit"
174192
run: "vendor/bin/phpunit --no-coverage"

0 commit comments

Comments
 (0)