Skip to content

Commit

Permalink
ci: Ensure cache save happens after install step (#13497)
Browse files Browse the repository at this point in the history
Noticed e.g. here:
https://github.com/getsentry/sentry-javascript/actions/runs/10594383971/job/29359100222
that saving of the cache was not working. I guess this only works for
the combined restore/save step, but here it expects that the cached data
is there immediately (which makes sense!).
  • Loading branch information
mydea authored Aug 28, 2024
1 parent 664d305 commit 3158c21
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ runs:
~/.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 All @@ -40,3 +31,12 @@ runs:
run: npx playwright install-deps ${{ inputs.browsers || 'chromium webkit firefox' }}
if: steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash

# 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 }}

0 comments on commit 3158c21

Please sign in to comment.