Merge pull request #6 from shashank03-dev/feat/login-motion-field #46
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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| env: | |
| CI: "true" | |
| GEMINI_API_KEY: test-gemini-key | |
| MOTIONCODE_INTERNAL_ADMIN_EMAILS: admin@example.com | |
| MOTIONCODE_INTERNAL_ADMIN_USER_IDS: 00000000-0000-4000-8000-000000000000 | |
| NEXT_PUBLIC_SITE_URL: http://127.0.0.1:3000 | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY: test-anon-key | |
| NEXT_PUBLIC_SUPABASE_URL: https://motioncode-ci.supabase.co | |
| RAZORPAY_KEY_ID: rzp_test_motioncode | |
| RAZORPAY_KEY_SECRET: razorpay_test_secret | |
| RAZORPAY_PRO_PLAN_ID: plan_pro_test | |
| RAZORPAY_STUDIO_PLAN_ID: plan_studio_test | |
| RAZORPAY_SUBSCRIPTION_TOTAL_COUNT: "120" | |
| RAZORPAY_WEBHOOK_SECRET: whsec_razorpay_motioncode | |
| SUPABASE_SERVICE_ROLE_KEY: test-service-role-key | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Lint | |
| run: npm run lint | |
| - name: Unit tests | |
| run: npm test | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: E2E tests | |
| run: npm run test:e2e | |
| - name: Build | |
| run: npm run build | |
| - name: Production dependency audit | |
| run: | | |
| npm audit --omit=dev --audit-level=moderate || { | |
| echo "npm audit failed; review docs/ops/audit-exceptions.md" | |
| test -f docs/ops/audit-exceptions.md | |
| } |