workflow updates
This commit is contained in:
+14
-28
@@ -12,25 +12,23 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
echo "Code already available in workspace"
|
||||||
- name: Setup Node.js
|
pwd
|
||||||
uses: actions/setup-node@v4
|
ls -la
|
||||||
with:
|
|
||||||
node-version: '18'
|
- name: Check Node.js version
|
||||||
cache: 'npm'
|
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
|
- 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
|
|
||||||
Reference in New Issue
Block a user