-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 2.03 KB
/
responsive.yaml
File metadata and controls
62 lines (49 loc) · 2.03 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
name: Responsive
# Prevents horizontal overflow regressions at common mobile/tablet viewport sizes.
# Runs Playwright against a VitePress preview build for every push or PR that
# touches the docs source or this workflow file.
on:
pull_request:
paths:
- "docs/**"
- "playwright.config.ts"
- "scripts/responsive.pw.ts"
- ".github/workflows/responsive.yaml"
concurrency:
group: responsive-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
responsive:
name: No horizontal scroll (mobile viewports)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2.1.3
- name: Install dependencies
run: bun install --frozen-lockfile
# Build the docs with localhost URLs so the embedded sitemap + internal
# links all resolve against the local preview server.
- name: Build docs (localhost URLs)
run: bun run docs:build:a11y
# Install only the Chromium browser — keeps the job fast (~150 MB vs 700 MB).
# Uses the Playwright binary from the installed devDependency (no bunx).
- name: Install Playwright (Chromium only)
run: ./node_modules/.bin/playwright install --with-deps chromium
# Shared composite action: starts preview server + waits until ready.
- name: Start VitePress preview server
uses: ./.github/actions/start-preview-server
- name: Run responsive tests
run: bun run docs:test:responsive
env:
PLAYWRIGHT_BASE_URL: http://localhost:4173
# Upload the Playwright HTML report as a workflow artifact so failing
# screenshots can be inspected without having to run locally.
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: playwright-report
path: playwright-report/
retention-days: 7