Skip to content

Revert "add attempt history to db" #16

Revert "add attempt history to db"

Revert "add attempt history to db" #16

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