workflow updates

This commit is contained in:
2025-09-09 14:52:08 -04:00
parent 9342261c7d
commit 9ae77cae5e
+13 -27
View File
@@ -12,25 +12,23 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 run: |
echo "Code already available in workspace"
pwd
ls -la
- name: Setup Node.js - name: Check Node.js version
uses: actions/setup-node@v4 run: |
with: which node || echo "Node.js not found in PATH"
node-version: '18' node --version || echo "Node.js not available"
cache: 'npm' which npm || echo "npm not found in PATH"
npm --version || echo "npm not available"
# Backend tests
- name: Install backend dependencies - name: Install backend dependencies
run: | run: |
cd backend cd backend
npm ci npm ci
- name: Run backend linting
run: |
cd backend
npm run lint
- name: Run backend tests - name: Run backend tests
env: env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/nfoguard_test DATABASE_URL: postgresql://postgres:postgres@localhost:5432/nfoguard_test
@@ -40,17 +38,11 @@ jobs:
cd backend cd backend
npm run test npm run test
# Frontend tests
- name: Install frontend dependencies - name: Install frontend dependencies
run: | run: |
cd frontend cd frontend
npm ci npm ci
- name: Run frontend linting
run: |
cd frontend
npm run lint
- name: Run frontend tests - name: Run frontend tests
run: | run: |
cd frontend cd frontend
@@ -67,15 +59,9 @@ jobs:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
steps: steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy application - name: Deploy application
run: | run: |
echo "Deploying to production..." echo "Deploying to production..."
# Add your deployment commands here echo "Current directory: $(pwd)"
# Examples: echo "Available files:"
# docker-compose down ls -la
# docker-compose pull
# docker-compose up -d
# or systemctl restart nfoguard