workflow updates for backend

This commit is contained in:
2025-09-09 14:53:56 -04:00
parent 9ae77cae5e
commit ac5bbfdc79
2 changed files with 42 additions and 11 deletions
+38 -10
View File
@@ -16,6 +16,9 @@ jobs:
echo "Code already available in workspace" echo "Code already available in workspace"
pwd pwd
ls -la ls -la
echo "Checking for backend and frontend directories:"
ls -la backend/ 2>/dev/null || echo "backend directory not found"
ls -la frontend/ 2>/dev/null || echo "frontend directory not found"
- name: Check Node.js version - name: Check Node.js version
run: | run: |
@@ -26,8 +29,13 @@ jobs:
- name: Install backend dependencies - name: Install backend dependencies
run: | run: |
cd backend if [ -d "backend" ]; then
npm ci cd backend
npm ci
else
echo "Backend directory not found, skipping backend dependencies"
exit 1
fi
- name: Run backend tests - name: Run backend tests
env: env:
@@ -35,23 +43,43 @@ jobs:
JWT_SECRET: test-secret-key-for-ci JWT_SECRET: test-secret-key-for-ci
NODE_ENV: test NODE_ENV: test
run: | run: |
cd backend if [ -d "backend" ]; then
npm run test cd backend
npm run test
else
echo "Backend directory not found, skipping backend tests"
exit 1
fi
- name: Install frontend dependencies - name: Install frontend dependencies
run: | run: |
cd frontend if [ -d "frontend" ]; then
npm ci cd frontend
npm ci
else
echo "Frontend directory not found, skipping frontend dependencies"
exit 1
fi
- name: Run frontend tests - name: Run frontend tests
run: | run: |
cd frontend if [ -d "frontend" ]; then
npm run test cd frontend
npm run test
else
echo "Frontend directory not found, skipping frontend tests"
exit 1
fi
- name: Build frontend - name: Build frontend
run: | run: |
cd frontend if [ -d "frontend" ]; then
npm run build cd frontend
npm run build
else
echo "Frontend directory not found, skipping frontend build"
exit 1
fi
deploy: deploy:
needs: test needs: test
+4 -1
View File
@@ -62,4 +62,7 @@ temp/
# Local development files (not for public repo) # Local development files (not for public repo)
*.local *.local
CODE_STRUCTURE.local CODE_STRUCTURE.local
RESTART_SUMMARY.md RESTART_SUMMARY.md
# Ignore GitHub workflows when pushing to Gitea
.github/