-
Notifications
You must be signed in to change notification settings - Fork 301
69 lines (68 loc) · 2.37 KB
/
playwright.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Playwright Tests
on:
push:
branches: [main, sessions]
pull_request:
branches: [main, sessions]
jobs:
e2e-test:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./app
env:
# We're skipping WebKit because of recurring issues with caching,
# despite always installing it on cache-hit.
CI_PLAYWRIGHT_SKIP_WEBKIT: true
steps:
- uses: actions/checkout@v4
- name: Install PNPM
uses: pnpm/action-setup@v4
with:
version: 9.12.0
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache-dependency-path: ./app/pnpm-lock.yaml
node-version: lts/*
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(pnpm list --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_ENV
- name: Cache Playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-${{ hashFiles('app/playwright.config.ts') }}
- 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
# WebKit dependencies can't be cached and must always be installed.
if: ${{ env.CI_PLAYWRIGHT_SKIP_WEBKIT != 'true' && steps.playwright-cache.outputs.cache-hit == 'true' }}
run: pnpm exec playwright install-deps webkit
- name: Build the app
run: pnpm run build
- uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: astral-sh/setup-uv@v3
with:
version: 0.5.5
enable-cache: true
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv pip install --system ../. uvloop
- run: uv pip list
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: app/playwright-report/
retention-days: 30