-
Notifications
You must be signed in to change notification settings - Fork 313
54 lines (45 loc) · 1.37 KB
/
examples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Examples E2E
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
e2e-node:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
dir:
[
minimal-appdir,
minimal-pagedir,
backend-adapters
]
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./tooling/gh-actions/setup
- name: Build UT packages
run: pnpm run build
- name: Run build
run: pnpm turbo --filter ./examples/${{ matrix.dir }} build
- name: Install playwright
run: |
cat ./examples/${{ matrix.dir }}/package.json |
if grep --silent '"@playwright/test"'; then
pnpm playwright install --with-deps
fi
- name: Run E2E Tests (if exists)
run: pnpm turbo --filter ./examples/${{ matrix.dir }} test
env:
UPLOADTHING_TOKEN: ${{ secrets.UPLOADTHING_E2E_TEST_TOKEN }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() && matrix.dir == 'backend-adapters' }}
with:
name: playwright-report
path: ./examples/${{ matrix.dir}}/playwright-report/
retention-days: 7