Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate miscellaneous features for collaboration feature #57

Merged
merged 10 commits into from
Oct 29, 2024
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:
USER_SERVICE_URL: ${{ vars.USER_SERVICE_URL }}
MATCHING_SERVICE_URL: ${{ vars.MATCHING_SERVICE_URL }}
HISTORY_SERVICE_URL: ${{ vars.HISTORY_SERVICE_URL }}
SIGNALLING_SERVICE_URL: ${{ vars.SIGNALLING_SERVICE_URL }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
QUESTION_FIREBASE_CREDENTIAL_PATH: ${{ vars.QUESTION_SERVICE_FIREBASE_CREDENTIAL_PATH }}
HISTORY_FIREBASE_CREDENTIAL_PATH: ${{ vars.HISTORY_SERVICE_FIREBASE_CREDENTIAL_PATH }}
DB_CLOUD_URI: ${{ secrets.USER_SERVICE_DB_CLOUD_URI }}
USER_SERVICE_PORT: ${{ vars.USER_SERVICE_PORT }}
MATCHING_SERVICE_PORT: ${{ vars.MATCHING_SERVICE_PORT }}
HISTORY_SERVICE_PORT: ${{ vars.HISTORY_SERVICE_PORT }}
SIGNALLING_SERVICE_PORT: ${{ vars.SIGNALLING_SERVICE_PORT }}
MATCHING_SERVICE_TIMEOUT: ${{ vars.MATCHING_SERVICE_TIMEOUT }}
REDIS_URL: ${{ vars.REDIS_URL }}
QUESTION_SERVICE_GRPC_URL: ${{ vars.QUESTION_SERVICE_GPRC_URL }}
Expand All @@ -46,6 +48,7 @@ jobs:
echo "NEXT_PUBLIC_USER_SERVICE_URL=$USER_SERVICE_URL" >> .env
echo "NEXT_PUBLIC_MATCHING_SERVICE_URL=$MATCHING_SERVICE_URL" >> .env
echo "NEXT_PUBLIC_HISTORY_SERVICE_URL=$HISTORY_SERVICE_URL" >> .env
echo "NEXT_PUBLIC_SIGNALLING_SERVICE_URL=$SIGNALLING_SERVICE_URL" >> .env

cd ../question-service
echo "FIREBASE_CREDENTIAL_PATH=$QUESTION_FIREBASE_CREDENTIAL_PATH" >> .env
Expand All @@ -67,6 +70,9 @@ jobs:
echo "FIREBASE_CREDENTIAL_PATH=$HISTORY_FIREBASE_CREDENTIAL_PATH" >> .env
echo "PORT=$HISTORY_SERVICE_PORT" >> .env

cd ../signalling-service
echo "PORT=$SIGNALLING_SERVICE_PORT" >> .env

- name: Create Database Credential Files
env:
QUESTION_FIREBASE_JSON: ${{ secrets.QUESTION_SERVICE_FIREBASE_CREDENTIAL }}
Expand Down Expand Up @@ -101,6 +107,7 @@ jobs:
QUESTION_SERVICE_URL: ${{ vars.QUESTION_SERVICE_URL }}
MATCHING_SERVICE_URL: ${{ vars.MATCHING_SERVICE_URL }}
HISTORY_SERVICE_URL: ${{ vars.HISTORY_SERVICE_URL }}
SIGNALLING_SERVICE_URL: ${{ vars.SIGNALLING_SERVICE_URL }}
run: |
echo "Testing Question Service..."
curl -sSL -o /dev/null $QUESTION_SERVICE_URL && echo "Question Service is up"
Expand All @@ -117,5 +124,10 @@ jobs:
echo "WebSocket for Matching Service is live"
fi
# Add in test for matching service in the future

echo "Testing Signalling Service..."
if ! (echo "Hello" | websocat $SIGNALLING_SERVICE_URL); then
echo "WebSocket for Signalling Service is not live"
else
echo "WebSocket for Signalling Service is live"
fi
# We can add more tests here
15 changes: 15 additions & 0 deletions apps/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
- ./frontend/.env
volumes:
- ./frontend:/frontend
depends_on:
- signalling-service

user-service:
build:
Expand Down Expand Up @@ -66,6 +68,19 @@ services:
- apps_network
volumes:
- ./history-service:/history-service

signalling-service:
build:
context: ./signalling-service
dockerfile: Dockerfile
ports:
- 4444:4444
env_file:
- ./signalling-service/.env
networks:
- apps_network
volumes:
- ./signalling-service:/signalling-service

redis:
image: redis:latest
Expand Down
Loading