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