Skip to content

Commit 5bdc15d

Browse files
additional http server check
Signed-off-by: James Xin <[email protected]>
1 parent 2ef3eca commit 5bdc15d

File tree

5 files changed

+27
-160
lines changed

5 files changed

+27
-160
lines changed

.github/json_matrices/build-matrix.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
"ARCH": "arm64",
2727
"TARGET": "aarch64-apple-darwin",
2828
"PACKAGE_MANAGERS": ["pypi", "npm", "maven", "pkg_go_dev"],
29+
"comment": "Making mac always run for in-PR testing, to be removed",
30+
"run": "always",
2931
"languages": ["python", "node", "java", "go", "dotnet", "php"]
3032
},
3133
{

.github/workflows/test-pie.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,20 @@ jobs:
9999
# Start HTTP server
100100
cd web && python3 -m http.server 8000 &
101101
echo $! > ../server.pid
102-
sleep 3
102+
103+
# Wait for server to be ready with proper health check
104+
echo "Waiting for HTTP server to start..."
105+
for i in {1..30}; do
106+
if curl -s http://localhost:8000/packages.json >/dev/null 2>&1; then
107+
echo "HTTP server is ready"
108+
break
109+
fi
110+
if [ $i -eq 30 ]; then
111+
echo "HTTP server failed to start after 30 seconds"
112+
exit 1
113+
fi
114+
sleep 1
115+
done
103116
104117
- name: Test PIE with manual repository
105118
run: |
@@ -122,6 +135,17 @@ jobs:
122135
sudo chown -R root:root "$HOME/.config/composer" || true
123136
fi
124137
138+
# Verify HTTP server is accessible before proceeding
139+
echo "=== Verifying HTTP server accessibility ==="
140+
curl -v http://localhost:8000/packages.json || {
141+
echo "ERROR: Cannot access local HTTP server"
142+
echo "Server process status:"
143+
ps aux | grep "python.*http.server" || echo "No HTTP server process found"
144+
echo "Port 8000 status:"
145+
lsof -i :8000 || echo "Port 8000 not in use"
146+
exit 1
147+
}
148+
125149
# Add local repository
126150
pie repository:add composer http://localhost:8000
127151

.vscode/launch.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 86 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)