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

Path CICD errors #124

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/backend-ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Backend CI Workflow

on:
on:
pull_request:
branches:
- main
Expand All @@ -22,32 +22,32 @@ jobs:

- name: Install Dependencies for Each Service
run: |
cd backend
for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")
for service in "${services[@]}"; do
echo "Installing dependencies for $service"
cd $service
cd backend/$service
npm install
cd ..
cd ../..
done

# Build Check for Each Service
- name: Build Each Service
run: |
cd backend
for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")
for service in "${services[@]}"; do
echo "Building $service"
cd $service
cd backend/$service
npm run build
cd ..
cd ../..
done

# Lint Check for Each Service
- name: Lint Each Service
run: |
cd backend
for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")
for service in "${services[@]}"; do
echo "Linting $service"
cd $service
cd backend/$service
npm run lint
cd ..
cd ../..
done
5 changes: 2 additions & 3 deletions .github/workflows/docker-build-push-gcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
SERVICES: ${{ vars.SERVICES }}
run: |
# Convert the comma-separated SERVICES string to an array
IFS=',' read -ra services <<< "$SERVICES"
# Define an array with the names of your services
services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service")

# Loop over each service, build and push its Docker image
for service in "${services[@]}"; do
Expand Down
1 change: 0 additions & 1 deletion backend/question-service/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
GetQuestionsDto,
UpdateQuestionDto,
FindQuestionByIdDto,
UpdateQuestionTestCasesDto,
} from './dto';

@Controller()
Expand Down
2 changes: 1 addition & 1 deletion backend/question-service/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model, Types } from 'mongoose';
import { Question } from './schema/question.schema';
import { CreateQuestionDto, GetQuestionsResponse, TestCase } from './dto';
import { CreateQuestionDto, GetQuestionsResponse } from './dto';
import { RpcException } from '@nestjs/microservices';
import { QUESTION_CATEGORIES } from './constants/question-categories.constant';

Expand Down
Loading