Skip to content

Commit e2dd981

Browse files
authored
Include Python version in CI cache key (#748)
Fixes #743 The venv cache was shared across all Python versions, causing conditional dependencies like async-timeout (needed for Python < 3.11) to be missing when a venv built for 3.11+ was restored for 3.10.
1 parent 82b917c commit e2dd981

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: actions/cache@v4
4949
with:
5050
path: .venv
51-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
51+
key: venv-${{ runner.os }}-${{ env.pythonversion }}-${{ hashFiles('**/poetry.lock') }}
5252
- name: Make sync version of library (redis_om)
5353
run: make sync
5454
#----------------------------------------------
@@ -120,7 +120,7 @@ jobs:
120120
uses: actions/cache@v4
121121
with:
122122
path: .venv
123-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
123+
key: venv-${{ runner.os }}-${{ matrix.pyver }}-${{ hashFiles('**/poetry.lock') }}
124124
#----------------------------------------------
125125
# Make sync version of library (redis_om)
126126
#----------------------------------------------

0 commit comments

Comments
 (0)