Skip to content

Commit

Permalink
suggestion-1
Browse files Browse the repository at this point in the history
  • Loading branch information
prayanshchh committed Dec 14, 2024
1 parent 57ae541 commit cfec867
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
- uses: actions/setup-node@v4
uses: actions/setup-node@v4
with:
node-version: '22.x'

Expand Down Expand Up @@ -365,7 +365,7 @@ jobs:
# Wait for TALAWA API to be healthy
timeout=60
until docker-compose -f docker-compose.dev.yaml exec -T talawa-api-dev curl -sf "http://talawa-api-dev:4000/health" 2>&1 || [ $timeout -eq 0 ]; do
until docker-compose -f docker-compose.dev.yaml exec -T talawa-api-dev curl -sf "http://localhost:4000/health" 2>&1 || [ $timeout -eq 0 ]; do
echo "Waiting for API to start... ($timeout seconds remaining)"
sleep 1
((timeout--))
Expand All @@ -382,11 +382,12 @@ jobs:

# Ensure cleanup runs even if the script fails
cleanup() {
local exit_code=$?
echo "Cleaning up containers..."
if ! docker-compose -f docker-compose.dev.yaml down -v; then
echo "Warning: Failed to cleanup containers"
fi
}
exit $exit_code }

trap cleanup EXIT
env:
Expand Down

0 comments on commit cfec867

Please sign in to comment.