fix: smoke test curl -sf fails on 401 — use http_code check instead
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 19s
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 19s
This commit is contained in:
@@ -53,5 +53,10 @@ jobs:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
sleep 3
|
||||
curl -sf http://localhost:3520/api/auth/me 2>&1 | grep -q '401\|session\|Not authenticated'
|
||||
echo "✅ API responds OK"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:3520/api/auth/me)
|
||||
if [ "$HTTP_CODE" = "401" ] || [ "$HTTP_CODE" = "200" ]; then
|
||||
echo "✅ API responds OK (HTTP $HTTP_CODE)"
|
||||
else
|
||||
echo "❌ API unreachable (HTTP $HTTP_CODE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user