generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
276 changed files
with
70,368 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
.github/workflows/build_and_test_master_collaboration_service.yaml
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build And Test Collaboration Service | ||
|
||
on: | ||
push: | ||
paths: | ||
- "CollaborationService/**" | ||
- ".github/workflows/build_and_test_master_collaboration_service.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "CollaborationService/**" | ||
- ".github/workflows/build_and_test_master_collaboration_service.yaml" | ||
|
||
jobs: | ||
build-and-test-collaboration-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_collaboration-service_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Collaboration Service and Collaboration Service Database with Docker Compose | ||
run: docker-compose build --no-cache collaboration-service collaboration-service-database | ||
|
||
- name: Run Collaboration Service and Collaboration Service Database with Docker Compose | ||
run: docker-compose up -d collaboration-service collaboration-service-database | ||
|
||
# - name: Wait For Startup | ||
# run: sleep 30 | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
- name: Set up Node.js Environment For Running Tests # Due to dependency issue, have separated test for matching service | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Node Dependencies For Running Tests | ||
run: npm install | ||
working-directory: CollaborationService | ||
|
||
- name: Run Test Cases in Collaboration Service | ||
run: npm test | ||
working-directory: CollaborationService | ||
|
||
- name: Retrieve and Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: collaboration-service-test-jest-report-artifacts | ||
path: CollaborationService/coverage/** | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
56 changes: 56 additions & 0 deletions
56
.github/workflows/build_and_test_master_communication_service.yaml
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build And Test Communication Service | ||
|
||
on: | ||
push: | ||
paths: | ||
- "CommunicationService/**" | ||
- ".github/workflows/build_and_test_master_communication_service.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "CommunicationService/**" | ||
- ".github/workflows/build_and_test_master_communication_service.yaml" | ||
|
||
jobs: | ||
build-and-test-communication-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_communication-service_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Communication Service with Docker Compose | ||
run: docker-compose build --no-cache communication-service | ||
|
||
- name: Run Communication Service with Docker Compose | ||
run: docker-compose up -d communication-service | ||
|
||
# - name: Wait For Startup | ||
# run: sleep 30 | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
- name: Run Test Cases in Communication Service | ||
run: docker exec $CONTAINER_NAME npm test | ||
|
||
- name: Retrieve Artifacts [JEST Test Reports] | ||
run: docker cp $CONTAINER_NAME:/usr/src/app/coverage ./communication-service-test-jest-reports | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: communication-service-test-jest-report-artifacts | ||
path: ./communication-service-test-jest-reports/* | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
56 changes: 56 additions & 0 deletions
56
.github/workflows/build_and_test_master_frontend_client.yaml
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build And Test Frontend Client | ||
|
||
on: | ||
push: | ||
paths: | ||
- "Frontend/**" | ||
- ".github/workflows/build_and_test_master_frontend_client.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "Frontend/**" | ||
- ".github/workflows/build_and_test_master_frontend_client.yaml" | ||
|
||
jobs: | ||
build-and-test-frontend-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_frontend_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Frontend Client with Docker Compose | ||
run: docker-compose build --no-cache frontend | ||
|
||
- name: Run Frontend Client with Docker Compose | ||
run: docker-compose up -d frontend | ||
|
||
# - name: Wait For Startup | ||
# run: sleep 30 | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
# - name: Run Test Cases in Frontend Client | ||
# run: docker exec $CONTAINER_NAME npm test | ||
|
||
# - name: Retrieve Artifacts [JEST Test Reports] | ||
# run: docker cp $CONTAINER_NAME:/app/coverage ./frontend-client-test-jest-reports | ||
|
||
# - name: Upload Artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: frontend-client-test-jest-report-artifacts | ||
# path: ./frontend-client-test-jest-reports/* | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build And Test GPT Service | ||
|
||
on: | ||
push: | ||
paths: | ||
- "GptService/**" | ||
- ".github/workflows/build_and_test_master_gpt_service.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "GptService/**" | ||
- ".github/workflows/build_and_test_master_gpt_service.yaml" | ||
|
||
jobs: | ||
build-and-test-gpt-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_gpt-service_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Create New Environment File With GPT API Key | ||
run: echo GPT_API_KEY=${{ secrets.GPT_API_KEY }} > GptService/.env | ||
|
||
- name: Build GPT Service with Docker Compose | ||
run: docker-compose build --no-cache gpt-service | ||
|
||
- name: Run GPT Service with Docker Compose | ||
run: docker-compose up -d gpt-service | ||
|
||
# - name: Wait For Startup | ||
# run: sleep 30 | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
- name: Run Test Cases in GPT Service | ||
run: docker exec $CONTAINER_NAME npm test | ||
|
||
- name: Retrieve Artifacts [JEST Test Reports] | ||
run: docker cp $CONTAINER_NAME:/usr/src/app/coverage ./gpt-service-test-jest-reports | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: gpt-service-test-jest-report-artifacts | ||
path: ./gpt-service-test-jest-reports/* | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
56 changes: 56 additions & 0 deletions
56
.github/workflows/build_and_test_master_history_service.yaml
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build And Test History Service | ||
|
||
on: | ||
push: | ||
paths: | ||
- "HistoryService/**" | ||
- ".github/workflows/build_and_test_master_history_service.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "HistoryService/**" | ||
- ".github/workflows/build_and_test_master_history_service.yaml" | ||
|
||
jobs: | ||
build-and-test-history-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_history-service_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build History Service and History Service Database with Docker Compose | ||
run: docker-compose build --no-cache history-service history-service-database | ||
|
||
- name: Run History Service and History Service Database with Docker Compose | ||
run: docker-compose up -d history-service history-service-database | ||
|
||
- name: Wait For Startup of MySQL Container | ||
run: sleep 10 | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
- name: Run Test Cases in History Service | ||
run: docker exec $CONTAINER_NAME npm test | ||
|
||
- name: Retrieve Artifacts [JEST Test Reports] | ||
run: docker cp $CONTAINER_NAME:/app/coverage ./history-service-test-jest-reports | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: history-service-test-jest-report-artifacts | ||
path: ./history-service-test-jest-reports/* | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
63 changes: 63 additions & 0 deletions
63
.github/workflows/build_and_test_master_matching_service.yaml
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build And Test Matching Service | ||
|
||
on: | ||
push: | ||
paths: | ||
- "MatchingService/**" | ||
- ".github/workflows/build_and_test_master_matching_service.yaml" | ||
|
||
pull_request: | ||
paths: | ||
- "MatchingService/**" | ||
- ".github/workflows/build_and_test_master_matching_service.yaml" | ||
|
||
jobs: | ||
build-and-test-matching-service: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CONTAINER_NAME: "ay2324s1-course-assessment-g16_matching-service_1" # Here _ is being used after file directory and service name vs - | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Environment | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Matching Service, Matching Service Database and RabbitMQ with Docker Compose | ||
run: docker-compose build --no-cache matching-service matching-service-database rabbitmq | ||
|
||
- name: Run Matching Service, Matching Service Database and RabbitMQ with Docker Compose | ||
run: docker-compose up -d matching-service matching-service-database rabbitmq | ||
|
||
- name: List Docker Containers | ||
run: docker ps | ||
|
||
- name: Logs [For Checking Status Only] | ||
run: docker-compose logs | ||
|
||
- name: Wait For Startup of Containers | ||
run: sleep 5 | ||
|
||
- name: Set up Node.js Environment For Running Tests # Due to dependency issue, have separated test for matching service | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Node Dependencies For Running Tests | ||
run: npm install | ||
working-directory: MatchingService | ||
|
||
- name: Run Test Cases in Matching Service | ||
run: npm test | ||
working-directory: MatchingService | ||
|
||
- name: Retrieve and Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: matching-service-test-jest-report-artifacts | ||
path: MatchingService/coverage/** | ||
|
||
- name: Shut Down Containers | ||
run: docker-compose down |
Oops, something went wrong.