Skip to content

Commit

Permalink
revert this?
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Aug 13, 2024
1 parent fe06839 commit fd389ef
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,9 @@ runs:
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
shell: bash

# We only want to store the cache if we are on the develop branch
- name: Cache playwright binaries
uses: actions/cache@v4
id: playwright-cache
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# On non-develop branches, only restore playwright from cache, but do not store it
# This is done to avoid keeping too many copies of playwright in the cache from different branches
- name: Cache playwright binaries (restore only)
uses: actions/cache/restore@v4
id: playwright-cache-restore
if: github.event_name != 'push' || github.ref != 'refs/heads/develop'
with:
path: |
~/.cache/ms-playwright
Expand All @@ -37,10 +24,10 @@ runs:
# We always install all browsers, if uncached
- name: Install Playwright dependencies (uncached)
run: npx playwright install chromium webkit firefox --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true' && steps.playwright-cache-restore.outputs.cache-hit =! 'true'
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash

- name: Install Playwright system dependencies only (cached)
run: npx playwright install-deps ${{ inputs.browsers || 'chromium webkit firefox' }}
if: steps.playwright-cache.outputs.cache-hit == 'true' || && steps.playwright-cache-restore.outputs.cache-hit == 'true'
if: steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash

0 comments on commit fd389ef

Please sign in to comment.