chore(e2e): pin anthropic for api e2e, servers, and ci #132
Workflow file for this run
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: API (E2E) | |
| on: | |
| pull_request: | |
| paths: | |
| - 'apps/api/**' | |
| - 'packages/email/**' | |
| - 'packages/sentry/**' | |
| - 'packages/utils/**' | |
| - 'packages/eslint-config/**' | |
| - 'packages/typescript-config/**' | |
| - 'pnpm-lock.yaml' | |
| - 'package.json' | |
| - 'turbo.json' | |
| concurrency: | |
| group: api-e2e-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| NODE_ENV: test | |
| CI: true | |
| PGLITE: true | |
| DATABASE_URL: postgresql://localhost/test | |
| JWT_SECRET: e2e-jwt-secret-min-32-chars-for-tests | |
| AI_PROVIDER: anthropic | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.29.3 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV" | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm turbo run build --filter=@repo/api... | |
| - name: Unit tests | |
| run: pnpm turbo run test --filter=@repo/api | |
| - name: Install Playwright | |
| run: pnpm --filter @repo/api exec playwright install chromium --with-deps | |
| - name: E2E tests (local) | |
| run: pnpm --filter @repo/api test:e2e:local | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-api | |
| path: apps/api/playwright-report/ | |
| retention-days: 30 |