diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8f05c7f..1807424 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -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