-
Notifications
You must be signed in to change notification settings - Fork 49
58 lines (51 loc) · 1.63 KB
/
_run_e2e_test.yml
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
name: Run E2E Tests
on:
workflow_call:
inputs:
url:
required: true
type: string
jobs:
e2e-test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
browser: [chromium, 'Mobile Safari']
fail-fast: false
defaults:
run:
working-directory: "frontend/packages/e2e"
env:
CI: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: ./.github/actions/pnpm-setup
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml', '**/playwright.config.ts') }}
restore-keys: |
playwright-${{ runner.os }}-
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps
- name: Install system dependencies for WebKit
# Some WebKit dependencies seem to lay outside the cache and will need to be installed separately
if: ${{ steps.playwright-cache.outputs.cache-hit == 'true' }}
run: pnpm exec playwright install-deps webkit
- name: Run e2e tests
run: pnpm exec playwright test --project="${{ matrix.browser }}"
env:
URL: ${{ inputs.url }}
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: frontend/packages/e2e/test-results/
retention-days: 30