-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
0ce003a
commit 1b07674
Showing
1 changed file
with
129 additions
and
0 deletions.
There are no files selected for viewing
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,129 @@ | ||
name: CI for Express Backend Servers | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
env: | ||
NODE_VERSION: "16" | ||
COLLABORATION_SERVICE_URL: "http://localhost:8001/api" | ||
MATCHING_SERVICE_URL: "http://localhost:8002/api" | ||
QUESTION_SERVICE_URL: "http://localhost:8003/api" | ||
USER_SERVICE_URL: "http://localhost:8004/api" | ||
|
||
jobs: | ||
collaboration_service: | ||
runs-on: ubuntu-latest | ||
name: Collaboration Service | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
working-directory: ./collaboration-service | ||
run: npm install | ||
|
||
- name: Build the service | ||
working-directory: ./collaboration-service | ||
run: npm run build | ||
|
||
- name: Start the service | ||
working-directory: ./collaboration-service | ||
run: | | ||
nohup npm run start & sleep 5 | ||
curl --fail ${{ env.COLLABORATION_SERVICE_URL }} || exit 1 | ||
- name: Stop the service | ||
run: pkill node | ||
|
||
matching_service: | ||
runs-on: ubuntu-latest | ||
name: Matching Service | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
working-directory: ./matching-service | ||
run: npm install | ||
|
||
- name: Build the service | ||
working-directory: ./matching-service | ||
run: npm run build | ||
|
||
- name: Start the service | ||
working-directory: ./matching-service | ||
run: | | ||
nohup npm run start & sleep 5 | ||
curl --fail ${{ env.MATCHING_SERVICE_URL }} || exit 1 | ||
- name: Stop the service | ||
run: pkill node | ||
|
||
question_service: | ||
runs-on: ubuntu-latest | ||
name: Question Service | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
working-directory: ./question-service | ||
run: npm install | ||
|
||
- name: Build the service | ||
working-directory: ./question-service | ||
run: npm run build | ||
|
||
- name: Start the service | ||
working-directory: ./question-service | ||
run: | | ||
nohup npm run start & sleep 5 | ||
curl --fail ${{ env.QUESTION_SERVICE_URL }} || exit 1 | ||
- name: Stop the service | ||
run: pkill node | ||
|
||
user_service: | ||
runs-on: ubuntu-latest | ||
name: User Service | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install dependencies | ||
working-directory: ./user-service | ||
run: npm install | ||
|
||
- name: Start the service | ||
working-directory: ./user-service | ||
run: | | ||
nohup npm run start & sleep 5 | ||
curl --fail ${{ env.USER_SERVICE_URL }} || exit 1 | ||
- name: Stop the service | ||
run: pkill node |