Skip to content

Commit 0b6ef08

Browse files
committed
indentation 2
1 parent 1544502 commit 0b6ef08

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

.github/workflows/pull-request.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,14 @@ jobs:
319319
${{ runner.os }}-docker-check-
320320
321321
- name: Check if Talawa API starts in Docker
322-
run : |
322+
run: |
323323
# Ensure no containers are running
324324
docker-compose -f docker-compose.dev.yaml down -v || true
325325
326326
# Verify docker-compose file exists
327-
if [ ! -f "docker-compose.dev.yaml" ]; then
327+
if [ ! -f "docker-compose.dev.yaml" ]; then
328328
echo "Error: docker-compose.dev.yaml not found"
329+
docker-compose -f docker-compose.dev.yaml logs
329330
exit 1
330331
fi
331332
@@ -341,7 +342,7 @@ jobs:
341342
timeout=30
342343
until docker-compose -f docker-compose.dev.yaml exec -T mongodb mongo --eval "db.runCommand('ping').ok">/dev/null 2>&1 || [ $timeout -eq 0 ]; do
343344
sleep 1
344-
((timeout--))
345+
((timeout--))
345346
done
346347
if [ $timeout -eq 0 ]; then
347348
echo "Error: MongoDB failed to start within timeout"
@@ -351,27 +352,27 @@ jobs:
351352
fi
352353
353354
echo "Waiting for Redis..."
354-
timeout=30
355-
until docker-compose -f docker-compose.dev.yaml exec -T redis-stack-server redis-cli ping >/dev/null 2>&1 || [ $timeout -eq 0 ]; do
355+
timeout=30
356+
until docker-compose -f docker-compose.dev.yaml exec -T redis-stack-server redis-cli ping >/dev/null 2>&1 || [ $timeout -eq 0 ]; do
356357
sleep 1
357358
((timeout--))
358359
done
359360
if[ $timeout -eq 0 ]; then
360-
echo "Error: Redis failed to start within timeout"
361+
echo "Error: Redis failed to start within timeout"
361362
docker-compose -f docker-compose.dev.yaml logs redis-stack-server
362-
docker-compose -f docker-compose.dev.yaml down -v
363-
exit 1
364-
fi
363+
docker-compose -f docker-compose.dev.yaml down -v
364+
exit 1
365+
fi
365366
366-
# Wait for TALAWA API to be healthy
367-
timeout=60
367+
# Wait for TALAWA API to be healthy
368+
timeout=60
368369
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
369-
echo "Waiting for API to start... ($timeout seconds remaining)"
370-
sleep 1
371-
((timeout--))
372-
done
370+
echo "Waiting for API to start... ($timeout seconds remaining)"
371+
sleep 1
372+
((timeout--))
373+
done
373374
374-
if [ $timeout -eq 0 ]; then
375+
if [ $timeout -eq 0 ]; then
375376
echo "Error: API failed to start within timeout"
376377
docker-compose -f docker-compose.dev.yaml logs
377378
docker-compose -f docker-compose.dev.yaml down -v
@@ -380,32 +381,31 @@ jobs:
380381
381382
echo "API started successfully"
382383
383-
# Ensure cleanup runs even if the script fails
384-
cleanup() {
385-
local exit_code=$?
386-
echo "Cleaning up containers..."
387-
if ! docker-compose -f docker-compose.dev.yaml down -v; then
388-
echo "Warning: Failed to cleanup containers"
389-
fi
390-
exit $exit_code
391-
}
392-
393-
trap cleanup EXIT
394-
env:
395-
HEALTH_CHECK_URL: http://localhost:4000
396-
COMPOSE_PROJECT_NAME: pr-${{ github.event.pull_request.number }}
397-
MONGO_DB_URL: mongodb://mongodb:27017/talawa-test-db
398-
REDIS_HOST: redis-stack-server
399-
REDIS_PORT: 6379
400-
ACCESS_TOKEN_SECRET: ${{ github.event.repository.name }}_access_${{ github.sha }}
401-
REFRESH_TOKEN_SECRET: ${{ github.event.repository.name }}_refresh_${{ github.sha }}
402-
LAST_RESORT_SUPERADMIN_EMAIL: "[email protected]"
403-
COLORIZE_LOGS: "true"
404-
LOG_LEVEL: "info"
405-
RECAPTCHA_SITE_KEY: ${{secrets.RECAPTCHA_SITE_KEY}}
406-
RECAPTCHA_SECRET_KEY: ${{secrets.RECAPTCHA_SECRET_KEY}}
407-
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}}
408-
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
384+
# Ensure cleanup runs even if the script fails
385+
cleanup() {
386+
local exit_code=$?
387+
echo "Cleaning up containers..."
388+
if ! docker-compose -f docker-compose.dev.yaml down -v; then
389+
echo "Warning: Failed to cleanup containers"
390+
fi
391+
exit $exit_code
392+
}
393+
trap cleanup EXIT
394+
env:
395+
HEALTH_CHECK_URL: http://localhost:4000
396+
COMPOSE_PROJECT_NAME: pr-${{ github.event.pull_request.number }}
397+
MONGO_DB_URL: mongodb://mongodb:27017/talawa-test-db
398+
REDIS_HOST: redis-stack-server
399+
REDIS_PORT: 6379
400+
ACCESS_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_number }}
401+
REFRESH_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_attempt }}
402+
LAST_RESORT_SUPERADMIN_EMAIL: "[email protected]"
403+
COLORIZE_LOGS: "true"
404+
LOG_LEVEL: "info"
405+
RECAPTCHA_SITE_KEY: ${{secrets.RECAPTCHA_SITE_KEY}}
406+
RECAPTCHA_SECRET_KEY: ${{secrets.RECAPTCHA_SECRET_KEY}}
407+
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}}
408+
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}}
409409

410410
JSDocs:
411411
if: ${{ github.actor != 'dependabot[bot]' }}

0 commit comments

Comments
 (0)