Skip to content

Commit 77515cd

Browse files
committed
CI
1 parent c4095f8 commit 77515cd

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ jobs:
120120
done
121121
echo "Server did not start in time" && exit 1
122122
123+
- name: Verify MySQL is accepting connections
124+
run: |
125+
for i in $(seq 1 10); do
126+
mysql -h 127.0.0.1 -uroot -proot -e "SELECT 1" && echo "MySQL ready" && exit 0
127+
echo "Waiting for MySQL... ($i/10)"
128+
sleep 2
129+
done
130+
echo "MySQL not ready" && exit 1
131+
123132
- name: Install WordPress
124133
run: |
125134
rm -f /tmp/wp/wp-config.php
@@ -146,6 +155,11 @@ jobs:
146155
- name: Show current config values
147156
run: wp config list --path=/tmp/wp --allow-root
148157

158+
- name: Warm up WordPress
159+
run: |
160+
curl -s -o /dev/null -w "wp-login.php: HTTP %{http_code} in %{time_total}s\n" http://localhost:8100/wp-login.php
161+
curl -s -o /dev/null -w "homepage: HTTP %{http_code} in %{time_total}s\n" http://localhost:8100/
162+
149163
- name: Install pnpm
150164
uses: pnpm/action-setup@v4
151165
with:

tests/Pest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
function asUser(string $login, string $password)
4848
{
4949
return visit('http://localhost:8100/wp-login.php')
50+
->assertPresent('#loginform')
5051
->fill('user_login', $login)
5152
->fill('user_pass', $password)
5253
->press('wp-submit')

0 commit comments

Comments
 (0)