feat: Implement email verification and migration flow for V2 #45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| env: | |
| NODE_VERSION: '18' | |
| jobs: | |
| # Quality Assurance Job | |
| qa: | |
| name: Quality Assurance | |
| 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' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Check for TypeScript errors (if applicable) | |
| run: | | |
| if [ -f "tsconfig.json" ]; then | |
| npx tsc --noEmit | |
| else | |
| echo "No TypeScript config found, skipping type check" | |
| fi | |
| - name: Run tests (if test script exists) | |
| run: | | |
| if npm run | grep -q "test"; then | |
| npm test | |
| else | |
| echo "No test script found, skipping tests" | |
| fi | |
| continue-on-error: true | |
| # Build Job | |
| build: | |
| name: Build Application | |
| runs-on: ubuntu-latest | |
| needs: qa | |
| 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' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build application | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-files | |
| path: dist/ | |
| retention-days: 1 | |
| # Security Scan Job | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| needs: qa | |
| 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' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run npm audit | |
| run: npm audit --audit-level=high | |
| continue-on-error: true | |
| # Lighthouse Performance Check | |
| lighthouse: | |
| name: Lighthouse Performance Check | |
| runs-on: ubuntu-latest | |
| needs: [qa, build] | |
| 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' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-files | |
| path: dist/ | |
| - name: List dist contents (debug) | |
| run: ls -la dist/ | |
| - name: Run Lighthouse CI | |
| uses: treosh/lighthouse-ci-action@v11 | |
| with: | |
| configPath: './lighthouserc.js' | |
| uploadArtifacts: true | |
| temporaryPublicStorage: true | |
| continue-on-error: true |