-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathaction.yml
More file actions
27 lines (23 loc) · 971 Bytes
/
action.yml
File metadata and controls
27 lines (23 loc) · 971 Bytes
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
name: "Setup Playwright"
description: "Setup Playwright with caching"
runs:
using: "composite"
steps:
- name: Put $HOME in env
if: runner.os == 'windows'
shell: pwsh
run: echo "HOME=$HOME" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Cache Playwright
id: playwright-cache
uses: actions/cache@v4
with:
path: ${{ runner.os == 'Windows' && format('{0}{1}', env.HOME, '\AppData\Local\ms-playwright') || runner.os == 'Linux' && '~/.cache/ms-playwright' || '~/Library/Caches/ms-playwright' }}
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Playwright with dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
run: pnpm playwright install --with-deps
- name: Install Playwright's dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash
run: pnpm playwright install-deps