Skip to content

Commit

Permalink
feat(workflow): add pytest step after API readiness check
Browse files Browse the repository at this point in the history
- Added a step in workflow to run tests using `pytest` after ensuring the backend service is ready.
- Tests are executed inside the running Docker container using `docker exec` to maintain consistency with the containerized environment.
  • Loading branch information
ddayto21 committed Jan 31, 2025
1 parent 9a1ae28 commit 121ce55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ jobs:
curl --silent --fail http://localhost:8000/health && break
sleep 2
done
echo "API is ready!"
- name: Run Tests with pytest
run: |
docker exec backend-container poetry run pytest --maxfail=3 --disable-warnings -v

0 comments on commit 121ce55

Please sign in to comment.