Skip to content

Commit

Permalink
Added workflow for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilRaikar17 committed Aug 4, 2024
1 parent b3d6790 commit 73e150a
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: FastAPI CI
on: [push, pull_request]

jobs:
test:
FastApi-backend:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -38,3 +38,38 @@ jobs:
echo "Health check failed"
exit 1
fi
Vue-frontend:
runs-on: ubuntu-latest
needs: FastApi-backend

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install frontend dependencies
run: |
cd frontend
npm install
- name: Run frontend development server
run: |
cd frontend
nohup npm run dev > /dev/null 2>&1 &
echo $! > npm.pid
sleep 10
- name: Verify frontend server is running
run: |
response=$(curl -s http://localhost:9000)
if [[ $response == *"expected content"* ]]; then
echo "Frontend is running"
else
echo "Frontend is not running or did not return expected content"
exit 1
fi

0 comments on commit 73e150a

Please sign in to comment.