-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Cache playwright separately (#13226)
We used to include the playwright binaries in the general dependency cache, which inflated this for no reason. Now, this is not included there anymore. Additionally, I extracted the code to install & cache playwright into a composite action, making it easier to reuse it.
- Loading branch information
Showing
3 changed files
with
49 additions
and
61 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,28 @@ | ||
name: "Install Playwright dependencies" | ||
description: "Installs Playwright dependencies and caches them." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get Playwright version | ||
id: playwright-version | ||
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Cache playwright binaries | ||
uses: actions/cache@v4 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | ||
|
||
- name: Install Playwright dependencies (uncached) | ||
run: npx playwright install chromium webkit firefox --with-deps | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
|
||
- name: Install Playwright system dependencies only (cached) | ||
run: npx playwright install-deps chromium webkit firefox | ||
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