-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.21 KB
/
Copy pathplaywright.yml
File metadata and controls
69 lines (60 loc) · 2.21 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
# =============================================================================
# Playwright Baseline Artifact — manual Linux snapshot generation.
#
# BASELINE STRATEGY (macOS dev vs. Linux CI):
# Rendering differs between operating systems, so visual baselines are
# platform-suffixed (see `snapshotPathTemplate` in playwright.config.ts:
# `...-{projectName}-{platform}{ext}`). Locally on macOS you generate
# `-darwin` snapshots; they are NOT the source of truth for CI.
#
# The authoritative `-linux` baselines are committed by humans. The deploy
# workflow runs the strict compare before publishing. This workflow is a
# manual helper only: it generates Linux baselines in the official Playwright
# container and uploads them as an artifact without committing.
#
# The container image is pinned to the installed @playwright/test version
# (1.61.1) so the browser binaries and the test runner stay in lockstep.
# =============================================================================
name: Playwright Baselines
on:
workflow_dispatch:
permissions:
contents: read
jobs:
generate-linux-baselines:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.61.1-jammy
env:
# The Playwright container expects HOME=/root; some Actions runners unset it.
HOME: /root
CI: 'true'
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install dependencies
run: npm ci
- name: Generate Linux baselines
run: npx playwright test --update-snapshots
- name: Upload generated Linux baselines
if: always()
uses: actions/upload-artifact@v7
with:
name: linux-visual-baselines
path: tests/__screenshots__/
retention-days: 14
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 14
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results
path: test-results/
if-no-files-found: ignore
retention-days: 14