Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: HMS Backend CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
Expand All @@ -19,6 +19,11 @@ jobs:
image: mongo:6.0
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout repository
Expand All @@ -37,7 +42,11 @@ jobs:
run: npm run lint

- name: Run Tests
env:
NODE_ENV: test
JWT_SECRET: testsecret123
MONGO_URI: mongodb://127.0.0.1:27017/hms_test
run: npm test

- name: Build docker image
- name: Build Docker Image
run: docker build -t hms-backend:${{ github.sha }} .
Loading