Skip to content

Commit

Permalink
ci: Only store playwright cache on develop (#13358)
Browse files Browse the repository at this point in the history
Should reduce amount of cached data.
  • Loading branch information
mydea authored Aug 14, 2024
1 parent e3d73ca commit 140b81d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ runs:
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
shell: bash

- name: Cache playwright binaries
uses: actions/cache@v4
- name: Restore cached playwright binaries
uses: actions/cache/restore@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# Only store cache on develop branch
- name: Store cached playwright binaries
uses: actions/cache/save@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# We always install all browsers, if uncached
- name: Install Playwright dependencies (uncached)
run: npx playwright install chromium webkit firefox --with-deps
Expand Down

0 comments on commit 140b81d

Please sign in to comment.