Skip to content
Merged
Show file tree
Hide file tree
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
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI
on: [push,pull_request]
jobs:
Backend:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:6 # Specify the desired MongoDB version
ports:
- 27017:27017 # Expose the default MongoDB port
options: >-
--health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
PORT: 8000
MONGODB_URL: mongodb://mongo:27017/testdb
JWT_SECRET: dummy

TWILIO_ACCOUNT_SID: ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TWILIO_AUTH_TOKEN: dummy
TWILIO_PHONE_NUMBER: dummy

CLOUDINARY_NAME: dummy
CLOUDINARY_API_KEY: dummy
CLOUDINARY_SECRET_KEY: dummy

FIREBASE_API_KEY: dummy
FIREBASE_AUTH_DOMAIN: dummy
FIREBASE_PROJECT_ID: dummy
FIREBASE_STORAGE_BUCKET: dummy
FIREBASE_MESSAGING_SENDER_ID: dummy
FIREBASE_APP_ID: dummy
FIREBASE_MEASUREMENT_ID: dummy

GOOGLE_CLIENT_ID: dummy
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
path: .
- name: Setup Node
uses: actions/setup-node@v5.0.0
- name: Install Dependencies and Run
run: |
cd backend
npm install
npm start &
sleep 5
curl -f http://localhost:${{ env.PORT }} || exit 1
pkill -f "node"


Frontend:
runs-on: ubuntu-latest
env:
VITE_GOOGLE_CLIENT_ID: dummy
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
path: .
- name: Setup Node
uses: actions/setup-node@v5.0.0
- name: Install Dependencies and Run #User
run: |
cd user
npm install
npm run dev &
sleep 5
curl -f http://localhost:5173 || exit 1
pkill -f "node"
- name: Install Dependencies and Run #Employee
run: |
cd employee
npm install
npm run dev &
sleep 5
curl -f http://localhost:5173 || exit 1
pkill -f "node"
- name: Install Dependencies and Run #Admin
run: |
cd admin
npm install
npm run dev &
sleep 5
curl -f http://localhost:5173 || exit 1
pkill -f "node"




24 changes: 24 additions & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"express": "^4.21.2",
"firebase": "^10.14.0",
"google-auth-library": "^10.3.0",
"helmet": "^8.1.0",
"hpp": "^0.2.3",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.6.3",
"multer": "^1.4.5-lts.1",
Expand Down