Skip to content

Commit

Permalink
Caching playwright binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 21, 2023
1 parent c91bb66 commit 6e53505
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,23 @@ jobs:
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-
npm-dependencies-${{ runner.os }}-
- name: Get installed Playwright version
id: playwright-version
run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')"

- name: Cache playwright binaries
id: playwright-cache
uses: actions/cache@v3
with:
path: "~/.cache/ms-playwright"
key: playwright-binaries-${{ runner.os }}-${{ env.cache-version }}-playwright-${{ steps.playwright-version.outputs.version }}

- name: "Install NPM dependencies"
run: |
npm ci
- name: "Install playwright browsers"
- name: "Install playwright binaries"
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: |
npx playwright install --with-deps
Expand Down

0 comments on commit 6e53505

Please sign in to comment.