generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (63 loc) · 1.66 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Node.js CI (build)
on:
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
# - name: Setup Node.js environment ${{ matrix.node-version }}
# uses: actions/[email protected]
# with:
# node-version: ${{ matrix.node-version }}
# cache: 'npm'
# working-directory: frontend
- name: Install dependencies
working-directory: frontend # Change this to the actual path of your frontend
run: npm ci
- name: Start microservices
run: |
cd matchmaking-service
docker-compose up -d
npm install
npm start &
cd ../collaboration-service
npm install
npm start &
cd ../question-service
npm install
npm start &
cd ../user-service
npm install
npm start &
cd ../chat-service
npm install
npm start &
cd ../frontend
npm install
npm run dev &
cd ../editor-service
npm install
npm start &
cd ../eval-service
npm install
npm start &
cd ../history-service
npm install
npm start &
shell: bash
- name: Build frontend
run: npm run build --if-present
working-directory: frontend
- name: Stop microservices
run: |
pkill -f "node collaboration-service" || true
pkill -f "node matchmaking-service" || true
pkill -f "node question-service" || true
pkill -f "node user-service" || true
shell: bash