Skip to content

Commit 64ce6b7

Browse files
fix/ci/playwright-browser-cache (#58)
1 parent aa43e59 commit 64ce6b7

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
~/.local/pipx
6969
~/.cache/pypoetry
7070
~/.cache/pip
71-
~/.cache/ms-playwright
7271
key: setup-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
7372
restore-keys: |
7473
setup-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
@@ -149,7 +148,6 @@ jobs:
149148
~/.local/pipx
150149
~/.cache/pypoetry
151150
~/.cache/pip
152-
~/.cache/ms-playwright
153151
key: setup-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
154152
restore-keys: |
155153
setup-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
@@ -183,9 +181,17 @@ jobs:
183181
- name: Run API tests
184182
run: poetry run pytest -rfsxE --capture=no --log-cli-level=DEBUG --maxfail=1 ./test/test__server__api.py
185183

184+
- name: Cache Playwright browsers
185+
id: cache-playwright
186+
uses: actions/cache@v4
187+
with:
188+
path: ~/.cache/ms-playwright
189+
key: playwright-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
186190

187191
- name: Install Playwright browser
192+
if: steps.cache-playwright.outputs.cache-hit != 'true'
188193
run: |
194+
source .venv/bin/activate
189195
poetry run playwright install --with-deps chromium
190196
191197
- name: Run Web UI tests

0 commit comments

Comments
 (0)