-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (72 loc) · 2.28 KB
/
playwright.yml
File metadata and controls
85 lines (72 loc) · 2.28 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
name: playwright
on:
pull_request:
paths:
- "ui/**"
- ".github/workflows/playwright.yml"
push:
branches: [main]
paths:
- "ui/**"
- ".github/workflows/playwright.yml"
permissions: read-all
concurrency:
group: playwright-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e:
name: e2e (chromium)
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 15
defaults:
run:
working-directory: ui
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: "22"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Install dependencies
run: npm ci
- name: Derive Playwright version
id: pw
run: |
set -eu
ver=$(node -p "require('@playwright/test/package.json').version")
echo "version=$ver" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: pw-cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }}
- name: Install Playwright browser (chromium)
if: steps.pw-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
- name: Install system deps for cached browser
if: steps.pw-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Run Playwright tests
env:
CI: "1"
run: npm run e2e
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: playwright-report
path: ui/playwright-report
retention-days: 7
if-no-files-found: ignore
- name: Upload failure traces
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: playwright-traces
path: ui/test-results
retention-days: 7
if-no-files-found: ignore