-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.49 KB
/
playwright.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
59
60
61
62
63
64
name: Playwright Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
# Allow updating snapshots during manual runs
workflow_call:
inputs:
update-snapshots:
description: "Update snapshots?"
type: boolean
# Allow updating snapshots during automatic runs
workflow_dispatch:
inputs:
update-snapshots:
description: "Update snapshots?"
type: boolean
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install deps
run: |
npm install
npx playwright install --with-deps
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
key: cache/${{github.repository}}/${{github.ref}}
restore-keys: cache/${{github.repository}}/refs/heads/master
path: .test/**
- name: Initialize snapshots
if: ${{steps.cache.outputs.cache-hit != 'true' || inputs.update-snapshots == 'true'}}
run: npx playwright test --update-snapshots --reporter html
- name: Test
run: npx playwright test
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
overwrite: true