Skip to content

Commit

Permalink
Update CI tests to include new services
Browse files Browse the repository at this point in the history
  • Loading branch information
xenosf committed Nov 6, 2024
1 parent e8bbdce commit 8906c03
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 2 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/server-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,63 @@ jobs:
sort_keys: false
- name: Install User Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
collaboration-service:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./server/collaboration-service
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_ENV: PROD
envkey_PORT_COLLABORATION: 3004
directory: .
file_name: .env
fail_on_empty: false
sort_keys: false
- name: Install Collaboration Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
ai-service:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./server/ai-service
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_ENV: PROD
envkey_PORT_AI: 3005
directory: .
file_name: .env
fail_on_empty: false
sort_keys: false
- name: Install AI Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
2 changes: 2 additions & 0 deletions .github/workflows/system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
envkey_PORT_USER: 3001
envkey_PORT_QUESTION: 3002
envkey_PORT_MATCHING: 3003
envkey_PORT_COLLABORATION: 3004
envkey_PORT_AI: 3005
envkey_DB_URI_QUESTION: mongodb://localhost:27017/question
envkey_DB_URI_USER: mongodb://localhost:27017/user
envkey_JWT_SECRET: secret
Expand Down
3 changes: 2 additions & 1 deletion server/ai-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
Expand All @@ -22,6 +22,7 @@
"socket.io": "^4.8.0"
},
"devDependencies": {
"jest": "^29.7.0",
"nodemon": "^3.1.4"
}
}
4 changes: 4 additions & 0 deletions server/ai-service/server.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

test('placeholder test', () => {
expect(true).toBe(true)
})
3 changes: 2 additions & 1 deletion server/collaboration-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
Expand All @@ -21,6 +21,7 @@
"socket.io": "^4.8.0"
},
"devDependencies": {
"jest": "^29.7.0",
"nodemon": "^3.1.4"
}
}
Expand Down
4 changes: 4 additions & 0 deletions server/collaboration-service/server.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

test('placeholder test', () => {
expect(true).toBe(true)
})

0 comments on commit 8906c03

Please sign in to comment.