-
Notifications
You must be signed in to change notification settings - Fork 17
74 lines (58 loc) · 1.95 KB
/
playwright.yml
File metadata and controls
74 lines (58 loc) · 1.95 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
# SPDX-License-Identifier: Apache-2.0
name: playwright
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: playwright-${{ github.ref }}
cancel-in-progress: true
env:
CI: 1
jobs:
playwright:
name: run playwright tests
runs-on: ubuntu-latest
permissions:
actions: write # for actions/cache to write to cache location
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-v2-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-v2-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: node_modules
key: ${{ runner.os }}-modules-v2-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-modules-v2-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-v1-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-v1-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
- name: install dependencies
run: npm ci --prefer-offline --no-audit
- name: install playwright browsers
run: npx playwright install --with-deps
- name: run playwright tests
run: npm run playwright
- name: upload playwright report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: playwright-report
path: playwright-report/
retention-days: 14