Skip to content

docs: Update README with comprehensive documentation and screenshots #75

docs: Update README with comprehensive documentation and screenshots

docs: Update README with comprehensive documentation and screenshots #75

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
env:
NODE_VERSION: '20'
jobs:
# ============================================
# BACKEND TESTS
# ============================================
backend-tests:
name: Backend Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: dva_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- name: Install dependencies
working-directory: backend
run: npm ci
- name: Create DB schema
working-directory: backend
run: npm run db:schema
env:
NODE_ENV: test
DB_HOST: localhost
DB_PORT: 5432
DB_USER: test
DB_PASSWORD: test
DB_NAME: dva_test
- name: Run unit tests
working-directory: backend
run: npm test -- --passWithNoTests
env:
NODE_ENV: test
DB_HOST: localhost
DB_PORT: 5432
DB_USER: test
DB_PASSWORD: test
DB_NAME: dva_test
# ============================================
# FRONTEND BUILD
# ============================================
frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build:prod
# ============================================
# BUILD VERIFICATION
# ============================================
build-verification:
name: Build Verification
runs-on: ubuntu-latest
needs: [backend-tests, frontend-build]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install backend dependencies
working-directory: backend
run: npm ci
- name: Build backend
working-directory: backend
run: npm run build
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build:prod
# ============================================
# DEPLOY TO RENDER (Optional - auto-deploy on main)
# ============================================
deploy:
name: Deploy to Render
runs-on: ubuntu-latest
needs: [build-verification]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy to Render
env:
RENDER_API_KEY: ${{ secrets.RENDER_API_KEY }}
run: |
echo "Triggering Render deployment..."
echo "Render Blueprint will auto-deploy on push to main"