Skip to content

Commit

Permalink
Refactor health check step and add web app start and health check ste…
Browse files Browse the repository at this point in the history
…ps in GitHub Actions workflow
  • Loading branch information
jrrobison1 committed Apr 5, 2024
1 parent ac729e1 commit cc67ec0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ jobs:
run: |
poetry run coverage report --fail-under=80
- name: Start the web app
run: |
poetry run python app.py &
- name: Start the web app
run: |
poetry run python app.py &
- name: Wait for the web app to start
run: sleep 5

- name: Perform health check
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5000/health)
if [[ $response == "200" ]]; then
echo "Health check passed"
else
echo "Health check failed with status code $response"
exit 1
fi

0 comments on commit cc67ec0

Please sign in to comment.