Skip to content

Commit 4b1d15f

Browse files
authored
fix(ci): remove restore-keys from cache to always use latest lockfile (#15)
* fix(ci): remove `restore-keys` from cache to always use latest lockfile * test: change cache prefix to force clean run
1 parent e2b6484 commit 4b1d15f

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ jobs:
4747
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
4848
with:
4949
path: .venv
50-
key: venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
51-
restore-keys: |
52-
venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-
50+
key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
5351

5452
- name: Install dependencies
5553
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -85,9 +83,7 @@ jobs:
8583
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
8684
with:
8785
path: .venv
88-
key: venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
89-
restore-keys: |
90-
venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-
86+
key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
9187

9288
- name: Install dependencies
9389
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -188,9 +184,7 @@ jobs:
188184
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
189185
with:
190186
path: .venv
191-
key: venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
192-
restore-keys: |
193-
venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-
187+
key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
194188

195189
- name: Install dependencies
196190
if: steps.cache-deps.outputs.cache-hit != 'true'
@@ -326,9 +320,7 @@ jobs:
326320
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
327321
with:
328322
path: .venv
329-
key: venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
330-
restore-keys: |
331-
venv-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-
323+
key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
332324

333325
- name: Install dependencies
334326
if: steps.cache-deps.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)