Skip to content

Commit aaa3dbd

Browse files
committed
Gate visual and GPU E2E correctness
1 parent e3107e7 commit aaa3dbd

12 files changed

Lines changed: 62 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,21 @@ jobs:
310310
run: pnpm test:native
311311

312312
# ---------------------------------------------------------------------------
313-
# Optional / manual jobs
313+
# Required end-to-end correctness
314314
# ---------------------------------------------------------------------------
315-
playwright:
316-
name: Playwright (Manual)
317-
if: github.event_name == 'workflow_dispatch'
318-
runs-on: ubuntu-latest
315+
e2e:
316+
name: E2E ${{ matrix.name }}
317+
strategy:
318+
fail-fast: false
319+
matrix:
320+
include:
321+
- name: Visual
322+
project: visual
323+
runner: macos-latest
324+
- name: GPU
325+
project: gpu
326+
runner: macos-latest
327+
runs-on: ${{ matrix.runner }}
319328
permissions:
320329
contents: read
321330
steps:
@@ -332,12 +341,7 @@ jobs:
332341
- name: Install toolchain
333342
run: rustup show
334343

335-
- uses: Swatinem/rust-cache@v2
336-
with:
337-
shared-key: shift-rust
338-
339344
- name: Cache node_modules
340-
id: modules-cache
341345
uses: actions/cache@v6
342346
with:
343347
path: |
@@ -350,38 +354,38 @@ jobs:
350354
- name: Install dependencies
351355
run: pnpm install --frozen-lockfile --prefer-offline
352356

353-
- name: Cache Playwright browsers
354-
id: playwright-cache
355-
uses: actions/cache@v6
356-
with:
357-
path: ~/.cache/ms-playwright
358-
key: playwright-${{ runner.os }}-${{ hashFiles('apps/desktop/node_modules/@playwright/test/package.json') }}
359-
360-
- name: Install Playwright browsers
361-
if: steps.playwright-cache.outputs.cache-hit != 'true'
362-
run: pnpm --filter @shift/desktop exec playwright install
363-
364357
- name: Cache native module binary
365358
id: native-cache
366359
uses: actions/cache@v6
367360
with:
368361
path: crates/shift-bridge/*.node
369362
key: native-module-${{ runner.os }}-${{ hashFiles('crates/**', 'Cargo.lock') }}
370363

364+
- uses: Swatinem/rust-cache@v2
365+
if: steps.native-cache.outputs.cache-hit != 'true'
366+
with:
367+
shared-key: shift-rust-${{ runner.os }}
368+
371369
- name: Build native module
372370
if: steps.native-cache.outputs.cache-hit != 'true'
373371
run: pnpm build:native
374372

375-
- name: Run Playwright tests
376-
run: xvfb-run pnpm test:playwright
377-
env:
378-
LIBGL_ALWAYS_SOFTWARE: "true"
373+
- name: Build E2E app
374+
run: pnpm --filter @shift/desktop build:e2e
375+
376+
- name: Run visual E2E tests
377+
if: matrix.project == 'visual'
378+
run: pnpm --filter @shift/desktop exec playwright test --project=visual
379+
380+
- name: Run GPU E2E tests
381+
if: matrix.project == 'gpu'
382+
run: pnpm --filter @shift/desktop exec playwright test --project=gpu
379383

380-
- name: Upload snapshots on failure
384+
- name: Upload Playwright failures
381385
if: failure()
382386
uses: actions/upload-artifact@v7
383387
with:
384-
name: playwright-results
388+
name: playwright-${{ matrix.project }}-results
385389
path: apps/desktop/e2e/test-results/
386390
retention-days: 7
387391

@@ -400,6 +404,7 @@ jobs:
400404
- rust-fmt
401405
- rust-check
402406
- integration
407+
- e2e
403408
runs-on: ubuntu-latest
404409
permissions: {}
405410
steps:

.github/workflows/perf.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,9 @@ jobs:
119119
- name: Run engine benchmarks
120120
run: pnpm test:perf
121121

122-
playwright:
123-
name: Playwright ${{ matrix.name }}
122+
playwright-perf:
123+
name: Playwright Perf
124124
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
125-
strategy:
126-
fail-fast: false
127-
matrix:
128-
include:
129-
- name: GPU
130-
project: gpu
131-
- name: Perf
132-
project: perf
133125
runs-on: macos-latest
134126
permissions:
135127
contents: read
@@ -215,19 +207,19 @@ jobs:
215207
- name: Build E2E app
216208
run: pnpm --filter @shift/desktop build:e2e
217209

218-
- name: Run Playwright ${{ matrix.name }} tests
219-
run: pnpm --filter @shift/desktop exec playwright test --project=${{ matrix.project }}
210+
- name: Run Playwright perf tests
211+
run: pnpm --filter @shift/desktop exec playwright test --project=perf
220212

221213
- name: Upload Playwright failures
222214
if: failure()
223215
uses: actions/upload-artifact@v7
224216
with:
225-
name: playwright-${{ matrix.project }}-results
217+
name: playwright-perf-results
226218
path: apps/desktop/e2e/test-results/
227219
retention-days: 7
228220

229221
- name: Upload perf results
230-
if: ${{ always() && matrix.project == 'perf' }}
222+
if: always()
231223
uses: actions/upload-artifact@v7
232224
with:
233225
name: perf-results
-3.26 KB
Loading
-2.8 KB
Loading
-6.1 KB
Loading
-3.78 KB
Loading
-3.26 KB
Loading
-3.78 KB
Loading
-3.26 KB
Loading
-3.26 KB
Loading

0 commit comments

Comments
 (0)