Skip to content

Commit eac5669

Browse files
committed
wip
1 parent 42760e7 commit eac5669

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,18 @@ jobs:
9999
PLUGIN_SLUG=$(basename "$GITHUB_WORKSPACE")
100100
ln -s "$GITHUB_WORKSPACE" "wordpress/wp-content/plugins/simpleanalytics"
101101
102-
- name: Start PHP server
102+
- name: Start WordPress server
103103
run: |
104-
php -S localhost:8100 -t wordpress > /dev/null 2>&1 & until curl -sSf http://localhost:8100 > /dev/null; do sleep 0.2; done
104+
wp server --host=localhost --port=8100 --allow-root --path=wordpress > /tmp/wp-server.log 2>&1 &
105+
# Health check
106+
for i in {1..30}; do
107+
if curl -sf http://localhost:8100/wp-login.php > /dev/null 2>&1; then
108+
echo "WordPress server ready"
109+
break
110+
fi
111+
[ $i -eq 30 ] && echo "Server failed to start" && cat /tmp/wp-server.log && exit 1
112+
sleep 1
113+
done
105114
106115
- name: Install pnpm
107116
uses: pnpm/action-setup@v4
@@ -139,3 +148,9 @@ jobs:
139148
path: |
140149
tests/Browser/Screenshots
141150
retention-days: 30
151+
152+
- name: Debug server status
153+
if: failure()
154+
run: |
155+
cat /tmp/wp-server.log || echo "No log file found"
156+
ps aux | grep php || true

0 commit comments

Comments
 (0)