forked from PalisadoesFoundation/talawa-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c54d6a
commit c942e2c
Showing
1 changed file
with
22 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,18 +344,24 @@ jobs: | |
# Wait for MongoDB and Redis to be ready | ||
echo "Waiting for MongoDB..." | ||
timeout=30 | ||
timeout=120 | ||
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 | ||
sleep 1 | ||
((timeout--)) | ||
done | ||
if [ $timeout -eq 0 ]; then | ||
echo "Error: MongoDB failed to start within timeout" | ||
echo "Fetching MongoDB logs..." | ||
docker-compose -f docker-compose.dev.yaml logs mongodb | ||
echo "Shutting down services..." | ||
docker-compose -f docker-compose.dev.yaml down -v | ||
exit 1 | ||
fi | ||
else | ||
echo "MongoDB is ready!" | ||
fi | ||
echo "Waiting for Redis..." | ||
timeout=30 | ||
until docker-compose -f docker-compose.dev.yaml exec -T redis-stack-server redis-cli ping >/dev/null 2>&1 || [ $timeout -eq 0 ]; do | ||
|
@@ -394,23 +400,23 @@ jobs: | |
echo "Warning: Failed to cleanup containers" | ||
fi | ||
exit $exit_code | ||
} | ||
} | ||
trap cleanup EXIT | ||
env: | ||
HEALTH_CHECK_URL: http://localhost:4000 | ||
COMPOSE_PROJECT_NAME: pr-${{ github.event.pull_request.number }} | ||
MONGO_DB_URL: mongodb://mongodb:27017/talawa-test-db | ||
REDIS_HOST: redis-stack-server | ||
REDIS_PORT: 6379 | ||
ACCESS_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_number }} | ||
REFRESH_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_attempt }} | ||
LAST_RESORT_SUPERADMIN_EMAIL: "[email protected]" | ||
COLORIZE_LOGS: "true" | ||
LOG_LEVEL: "info" | ||
RECAPTCHA_SITE_KEY: ${{secrets.RECAPTCHA_SITE_KEY}} | ||
RECAPTCHA_SECRET_KEY: ${{secrets.RECAPTCHA_SECRET_KEY}} | ||
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}} | ||
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}} | ||
HEALTH_CHECK_URL: http://localhost:4000 | ||
COMPOSE_PROJECT_NAME: pr-${{ github.event.pull_request.number }} | ||
MONGO_DB_URL: mongodb://mongodb:27017/talawa-test-db | ||
REDIS_HOST: redis-stack-server | ||
REDIS_PORT: 6379 | ||
ACCESS_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_number }} | ||
REFRESH_TOKEN_SECRET: ${{ secrets.GITHUB_TOKEN }}_${{ github.run_id }}_${{ github.run_attempt }} | ||
LAST_RESORT_SUPERADMIN_EMAIL: "[email protected]" | ||
COLORIZE_LOGS: "true" | ||
LOG_LEVEL: "info" | ||
RECAPTCHA_SITE_KEY: ${{secrets.RECAPTCHA_SITE_KEY}} | ||
RECAPTCHA_SECRET_KEY: ${{secrets.RECAPTCHA_SECRET_KEY}} | ||
MAIL_USERNAME: ${{secrets.MAIL_USERNAME}} | ||
MAIL_PASSWORD: ${{secrets.MAIL_PASSWORD}} | ||
|
||
JSDocs: | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
|