-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fce7510
commit 41e7312
Showing
12 changed files
with
247 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Set Up Playwright | ||
description: Sets up Playwright | ||
inputs: | ||
working-directory: | ||
description: Where to run | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
# Adapted from https://playwrightsolutions.com/playwright-github-action-to-cache-the-browser-binaries/ | ||
- name: Get installed Playwright version | ||
id: playwright-version | ||
run: echo version=$(yarn info --json @playwright/test | jq -r '.children.Version') >> $GITHUB_OUTPUT | ||
working-directory: ${{ inputs.working-directory }} | ||
shell: bash | ||
|
||
- name: Cache playwright binaries | ||
uses: actions/cache@v4 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }} | ||
|
||
- name: Install Playwright Browsers | ||
run: yarn playwright install --with-deps | ||
working-directory: ${{ inputs.working-directory }} | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
|
||
- name: Install Playwright OS dependencies | ||
run: npx playwright install-deps | ||
working-directory: ${{ inputs.working-directory }} | ||
if: steps.playwright-cache.outputs.cache-hit == 'true' | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.