Skip to content

Commit

Permalink
Merge pull request #39 from xenosf/testing-ci
Browse files Browse the repository at this point in the history
CI improvements
  • Loading branch information
xenosf authored Nov 7, 2024
2 parents a266c7e + a33bd7e commit 076f8c9
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ jobs:
- name: Install Client Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci -- --coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ jobs:
- name: Install Matching Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
question-service:
strategy:
fail-fast: false
Expand Down Expand Up @@ -66,7 +70,11 @@ jobs:
- name: Install Question Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
user-service:
strategy:
fail-fast: false
Expand Down Expand Up @@ -97,7 +105,11 @@ jobs:
- name: Install User Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
collaboration-service:
strategy:
fail-fast: false
Expand Down Expand Up @@ -126,7 +138,11 @@ jobs:
- name: Install Collaboration Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
ai-service:
strategy:
fail-fast: false
Expand Down Expand Up @@ -156,4 +172,8 @@ jobs:
- name: Install AI Service Dependencies
run: npm ci
- name: Run Tests
run: npm run test
run: npm run ci
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ jobs:
cd client
npm ci
npm run start &
- name: Run Tests
run: |
sleep 60
xvfb-run --server-args="-screen 0 1024x768x24" npm run test
- name: Run Tests
uses: nick-fields/retry@v3
with:
timeout_seconds: 100
max_attempts: 5
retry_on: error
command: xvfb-run --server-args="-screen 0 1024x768x24" npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
**/.DS_Store
server/matching-service/dump.rdb
**/dist
**/coverage
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"ci": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
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 @@ -6,7 +6,8 @@
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
"dev": "nodemon server.js",
"ci": "jest --ci --coverage"
},
"keywords": [],
"author": "",
Expand Down
3 changes: 2 additions & 1 deletion server/collaboration-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
"dev": "nodemon server.js",
"ci": "jest --ci --coverage"
},
"keywords": [],
"author": "",
Expand Down
3 changes: 2 additions & 1 deletion server/matching-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
"dev": "nodemon server.js",
"ci": "jest --ci --coverage"
},
"keywords": [],
"author": "",
Expand Down
3 changes: 2 additions & 1 deletion server/question-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"test": "jest",
"serve": "node server.js",
"start": "node server.js",
"dev": "nodemon server.js"
"dev": "nodemon server.js",
"ci": "jest --ci --coverage"
},
"keywords": [],
"author": "",
Expand Down
3 changes: 2 additions & 1 deletion server/user-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"dev": "nodemon server.js",
"start": "node server.js",
"test": "jest"
"test": "jest",
"ci": "jest --ci --coverage"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 076f8c9

Please sign in to comment.