Repository navigation
125 lines (105 loc) · 3.47 KB
/
Copy pathe2e.yml
File metadata and controls
125 lines (105 loc) · 3.47 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: e2e
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: e2e-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Select E2E checks
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
e2e: ${{ steps.scope.outputs.e2e }}
steps:
- name: Checkout complete PR history
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Test E2E change selection
run: node --test scripts/ci/e2e-scope.test.mjs
- name: Select relevant PR changes or manual full run
id: scope
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
scope=$(node scripts/ci/e2e-scope.mjs "$BASE_SHA" "$HEAD_SHA")
echo "e2e=$scope" >> "$GITHUB_OUTPUT"
e2e:
name: Playwright E2E (${{ matrix.shard }}/4)
needs: changes
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.e2e == 'true') }}
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
package_json_file: webui/package.json
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: webui/pnpm-lock.yaml
- name: Install FFmpeg
run: |
# Azure's mirror intermittently stalls downloads (actions/runner-images#12949).
sudo sed -i '/azure\.archive\.ubuntu\.com/d' /etc/apt/apt-mirrors.txt
sudo apt-get update
sudo apt-get install --yes --no-install-recommends ffmpeg
- name: Verify E2E prerequisites and runner capacity
run: |
ffmpeg -version
printf 'Runner capacity: %s logical CPUs\n' "$(nproc)"
free --human
- name: Build embedded E2E application
run: make e2e-build
- name: Install Playwright browser
working-directory: webui
run: pnpm exec playwright install --with-deps --only-shell chromium
- name: Run E2E
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: test-results/results.json
run: pnpm --dir webui exec playwright test --shard=${{ matrix.shard }}/4 --reporter=list,html,json
- name: Upload Playwright timings
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: playwright-timings-${{ matrix.shard }}
path: webui/test-results/results.json
if-no-files-found: ignore
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-report-${{ matrix.shard }}
path: webui/playwright-report
if-no-files-found: ignore
- name: Upload Playwright traces
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-test-results-${{ matrix.shard }}
path: webui/test-results
if-no-files-found: ignore