-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refactor/checkout-post-message-handler
- Loading branch information
Showing
12 changed files
with
86 additions
and
21 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,39 @@ | ||
name: "Playwright setup" | ||
description: "Install the browsers and dependencies for Playwright to run" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Playwright versions in sync check | ||
shell: bash | ||
run: | | ||
versions=$(yarn why --json @playwright/test | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://') | ||
unique_versions=$(echo "$versions" | sort | uniq) | ||
if [ $(echo "$unique_versions" | wc -l) -ne 1 ]; then | ||
echo "Playwright versions are not in sync:" | ||
echo "$unique_versions" | ||
exit 1 | ||
else | ||
echo "All Playwright versions are in sync." | ||
fi | ||
- name: Get Playwright version | ||
shell: bash | ||
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('playwright/package.json').version)")" >> $GITHUB_ENV | ||
|
||
- name: Cache Playwright Browsers | ||
id: cache-playwright-browsers | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: playwright-browsers-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }} | ||
|
||
- name: Install Playwright with dependencies | ||
shell: bash | ||
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | ||
run: yarn dlx playwright@${{ env.PLAYWRIGHT_VERSION }} install --with-deps | ||
|
||
- name: Install Playwright dependencies | ||
shell: bash | ||
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' | ||
run: yarn dlx playwright@${{ env.PLAYWRIGHT_VERSION }} install-deps |
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
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
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
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
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
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