Open History to see the last commit
1name: E2E Tests
2
3on:
4 pull_request:
5 push:
6 branches: [main, alpha, beta, rc]
7
8concurrency:
9 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
10 cancel-in-progress: true
11
12env:
13 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
14
15permissions:
16 contents: read
17
18jobs:
19 e2e:
20 name: E2E Tests
21 runs-on: ubuntu-latest
22 timeout-minutes: 15
23 steps:
24 - name: Checkout
25 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26 with:
27 fetch-depth: 0
28 persist-credentials: false
29
30 - name: Setup Tools
31 uses: TanStack/config/.github/setup@190f659075ff0845850e330883eb26d7ffd0671f # main
32
33 - name: Cache Playwright Browsers
34 id: playwright-cache
35 uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
36 with:
37 path: ~/.cache/ms-playwright
38 key: playwright-${{ hashFiles('testing/e2e/package.json') }}
39 restore-keys: |
40 playwright-
41
42 - name: Build Packages
43 run: pnpm run build:all
44
45 - name: Install Playwright Chromium
46 if: steps.playwright-cache.outputs.cache-hit != 'true'
47 run: pnpm --filter @tanstack/ai-e2e exec playwright install --with-deps chromium
48
49 - name: Install Playwright Deps (if cached)
50 if: steps.playwright-cache.outputs.cache-hit == 'true'
51 run: pnpm --filter @tanstack/ai-e2e exec playwright install-deps chromium
52
53 - name: Run E2E Tests
54 run: pnpm --filter @tanstack/ai-e2e test:e2e
55
56 - name: Upload Video Recordings
57 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
58 if: always()
59 with:
60 name: e2e-videos
61 path: testing/e2e/test-results/**/*.webm
62 retention-days: 14
63
64 - name: Upload Playwright Report
65 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
66 if: always()
67 with:
68 name: e2e-report
69 path: testing/e2e/playwright-report/
70 retention-days: 14
71
72 - name: Upload Traces (on failure)
73 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
74 if: failure()
75 with:
76 name: e2e-traces
77 path: testing/e2e/test-results/**/*.zip
78 retention-days: 14