File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments