Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

e2e.yml

77 lines2.3 KB

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: 30
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 # GitHub-hosted ubuntu-24.04 already has Chromium system libs.
46 # install-deps / --with-deps run apt-get against azure.archive.ubuntu.com
47 # and that mirror hangs, which kills this job.
48 - name: Install Playwright Chromium
49 if: steps.playwright-cache.outputs.cache-hit != 'true'
50 run: pnpm --filter @tanstack/ai-e2e exec playwright install chromium
51​
52 - name: Run E2E Tests
53 run: pnpm --filter @tanstack/ai-e2e test:e2e
54​
55 - name: Upload Video Recordings
56 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
57 if: always()
58 with:
59 name: e2e-videos
60 path: testing/e2e/test-results/**/*.webm
61 retention-days: 14
62​
63 - name: Upload Playwright Report
64 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
65 if: always()
66 with:
67 name: e2e-report
68 path: testing/e2e/playwright-report/
69 retention-days: 14
70​
71 - name: Upload Traces (on failure)
72 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
73 if: failure()
74 with:
75 name: e2e-traces
76 path: testing/e2e/test-results/**/*.zip
77 retention-days: 14