name: Test on: push: branches: [main, master, 'claude/**'] pull_request: branches: [main, master] env: NODE_VERSION: '20' jobs: unit-tests: name: Unit Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} cache: 'npm' - run: npm ci - name: Run unit tests run: npm test e2e-tests: name: E2E Tests runs-on: ubuntu-latest needs: unit-tests steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} cache: 'npm' - run: npm ci - name: Install Playwright run: npx playwright install --with-deps chromium - name: Run E2E tests run: npm run test:e2e env: STRIPE_SECRET_KEY: sk_test_placeholder STRIPE_WEBHOOK_SECRET: whsec_test_secret NODE_ENV: test