Skip to content

chore(deps): bump react and @types/react #16

chore(deps): bump react and @types/react

chore(deps): bump react and @types/react #16

Workflow file for this run

name: Frontend CI/CD
on:
push:
branches: [ main, develop ]
paths:
- 'src/**'
- 'public/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'tailwind.config.js'
pull_request:
branches: [ main, develop ]
paths:
- 'src/**'
- 'public/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'tailwind.config.js'
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Clear npm cache and install dependencies
run: |
npm cache clean --force
rm -rf node_modules
npm ci
- name: Run linting
run: npm run lint || echo "Linting not configured, skipping..."
- name: Run type checking
run: npx tsc --noEmit
- name: Run tests
run: npm test -- --coverage --watchAll=false || echo "Tests not configured, skipping..."
- name: Build application
run: npm run build
env:
REACT_APP_BACKEND_API_URL: https://quantflow-backend-api.onrender.com
REACT_APP_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
REACT_APP_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-files-${{ matrix.node-version }}
path: build/
- name: Security audit
run: npx audit-ci --config .audit-ci.json
deploy-preview:
needs: test-and-build
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-files-18.x
path: build/
- name: Deploy to preview
run: |
echo "🚀 Deploying to preview environment..."
echo "Preview URL: https://quantflow-pr-${{ github.event.number }}.vercel.app"
deploy-production:
needs: test-and-build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build for production
run: npm run build
env:
REACT_APP_BACKEND_API_URL: https://quantflow-backend-api.onrender.com
REACT_APP_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
REACT_APP_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
- name: Notify deployment
run: |
echo "🎉 Successfully deployed to production!"
echo "Production URL: https://quantflow.vercel.app"