Skip to content

Commit

Permalink
update step
Browse files Browse the repository at this point in the history
  • Loading branch information
timothy-lew committed Dec 30, 2024
1 parent d8eac6c commit 8805b86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ jobs:
- name: Assert app is running
run: |
sleep 10 # Wait for a few seconds to ensure the app has started
sleep 5 # Wait for a few seconds to ensure the app has started
response=$(curl --silent --fail http://127.0.0.1:8000)
echo "Response: $response"
# Assert the response matches the expected output
echo "$response" | grep -q '{"message":"Welcome to the Patient API Testing"}'
if [ $? -ne 0 ]; then
echo "App did not respond with the expected message."
exit 1 # Fail the job if the message doesn't match
echo "App did not respond with the expected message."
exit 1 # Fail the script if the message doesn't match
else
echo "App responded with the expected message."
fi
- name: Stop the uvicorn server
Expand Down

0 comments on commit 8805b86

Please sign in to comment.