We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61d25cb commit c26a616Copy full SHA for c26a616
.github/workflows/ci.yml
@@ -2,9 +2,9 @@ name: HMS Backend CI
2
3
on:
4
push:
5
- branches: [ main ]
+ branches: [main]
6
pull_request:
7
8
9
jobs:
10
build:
@@ -19,6 +19,11 @@ jobs:
19
image: mongo:6.0
20
ports:
21
- 27017:27017
22
+ options: >-
23
+ --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'"
24
+ --health-interval 10s
25
+ --health-timeout 5s
26
+ --health-retries 5
27
28
steps:
29
- name: Checkout repository
@@ -37,7 +42,11 @@ jobs:
37
42
run: npm run lint
38
43
39
44
- name: Run Tests
45
+ env:
46
+ NODE_ENV: test
47
+ JWT_SECRET: testsecret123
48
+ MONGO_URI: mongodb://127.0.0.1:27017/hms_test
40
49
run: npm test
41
50
- - name: Build docker image
51
+ - name: Build Docker Image
52
run: docker build -t hms-backend:${{ github.sha }} .
0 commit comments