Skip to content

Commit

Permalink
Cache playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Oct 24, 2024
1 parent d0f9789 commit 86d8d07
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/actions/init-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,26 @@ runs:
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --with test --with dev --with docs --all-extras
shell: bash

- name: Activate venv
run: |
source $VENV
echo PATH=$PATH >> $GITHUB_ENV
shell: bash

- name: Get installed Playwright version
id: playwright-version
run: |
version=$(poetry run playwright/ -V | awk '{print $2}' | tr -d '\n')
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash

- uses: actions/cache@v4
id: playwright-cache
with:
path: ${{ matrix.os == 'windows-latest' && '%USERPROFILE%\\AppData\\Local\\ms-playwright' || '~/.cache/ms-playwright' }}
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}'

- name: Install playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: playwright install --with-deps
shell: bash

0 comments on commit 86d8d07

Please sign in to comment.