Skip to content

Commit

Permalink
fix(ci): health check
Browse files Browse the repository at this point in the history
  • Loading branch information
joseferben committed Sep 20, 2024
1 parent a88370a commit ac057f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ jobs:
- name: 200 ok ✅
run: |
pnpm dev &
sleep 10 # Wait for the server to start
if curl -s http://localhost:3000 | grep -q "{\"status\":\"ok\"}"; then
echo "Server started successfully and contains 'Let's go'"
sleep 5 # wait for the server to start
response=$(curl -s http://localhost:3000/health)
if echo "$response" | grep -q '{"status":"ok"}'; then
echo "Server started and healthy"
echo "Response: $response"
else
echo "Server check failed"
echo "Unexpected response: $response"
exit 1
fi
kill $! # Stop the server
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"express": "^4.19.2",
"htmx.org": "^1.9.12",
"kysely": "^0.27.4",
"plainstack": "^0.0.18",
"plainstack": "^0.0.19",
"tsx": "^4.16.2",
"zod": "^3.23.8"
},
Expand Down
12 changes: 7 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac057f6

Please sign in to comment.