Skip to content

Commit 24955d9

Browse files
committed
Move cache+python combo
1 parent 2ac821d commit 24955d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/verify.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml"
3838
- name: Compute cache key
3939
id: set-key
40-
run: echo "cache-key=${{ runner.os }}-venv-cache-${{ env.CACHE_VERSION }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml') }}" >> "$GITHUB_OUTPUT"
40+
run: echo "cache-key=${{ runner.os }}-venv-cache-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml') }}" >> "$GITHUB_OUTPUT"
4141

4242
# Prepare default python version environment
4343
prepare:
@@ -49,7 +49,7 @@ jobs:
4949
id: cache-reuse
5050
uses: plugwise/gh-actions/prepare-python-and-code@v1
5151
with:
52-
cache-key: ${{ needs.cache.outputs.cache-key }}
52+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
5353
fail-on-miss: false # First time create cache (if not already exists)
5454
python-version: ${{ needs.cache.outputs.python-version }}
5555
venv-dir: ${{ env.VENV }}
@@ -70,7 +70,7 @@ jobs:
7070
id: cache-reuse
7171
uses: plugwise/gh-actions/restore-venv@v1
7272
with:
73-
cache-key: ${{ needs.cache.outputs.cache-key }}
73+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
7474
python-version: ${{ needs.cache.outputs.python-version}}
7575
venv-dir: ${{ env.VENV }}
7676
precommit-home: ${{ env.PRE_COMMIT_HOME }}
@@ -106,7 +106,7 @@ jobs:
106106
id: cache-reuse
107107
uses: plugwise/gh-actions/restore-venv@v1
108108
with:
109-
cache-key: ${{ needs.cache.outputs.cache-key }}
109+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
110110
python-version: ${{ needs.cache.outputs.python-version}}
111111
venv-dir: ${{ env.VENV }}
112112
precommit-home: ${{ env.PRE_COMMIT_HOME }}
@@ -147,7 +147,7 @@ jobs:
147147
uses: plugwise/gh-actions/restore-venv@v1
148148
with:
149149
fail-on-miss: false # First time create cache (if not already exists)
150-
cache-key: ${{ needs.cache.outputs.cache-key }}
150+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ matrix.python-version }}
151151
python-version: ${{ matrix.python-version }} # Force to installed python minor
152152
venv-dir: ${{ env.VENV }}
153153
precommit-home: ${{ env.PRE_COMMIT_HOME }}
@@ -179,7 +179,7 @@ jobs:
179179
id: cache-reuse
180180
uses: plugwise/gh-actions/restore-venv@v1
181181
with:
182-
cache-key: ${{ needs.cache.outputs.cache-key }}
182+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
183183
python-version: ${{ needs.cache.outputs.python-version}}
184184
venv-dir: ${{ env.VENV }}
185185
precommit-home: ${{ env.PRE_COMMIT_HOME }}
@@ -224,7 +224,7 @@ jobs:
224224
id: cache-reuse
225225
uses: plugwise/gh-actions/restore-venv@v1
226226
with:
227-
cache-key: ${{ needs.cache.outputs.cache-key }}
227+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
228228
python-version: ${{ needs.cache.outputs.python-version}}
229229
venv-dir: ${{ env.VENV }}
230230
precommit-home: ${{ env.PRE_COMMIT_HOME }}
@@ -306,7 +306,7 @@ jobs:
306306
id: cache-reuse
307307
uses: plugwise/gh-actions/restore-venv@v1
308308
with:
309-
cache-key: ${{ needs.cache.outputs.cache-key }}
309+
cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }}
310310
python-version: ${{ needs.cache.outputs.python-version}}
311311
venv-dir: ${{ env.VENV }}
312312
precommit-home: ${{ env.PRE_COMMIT_HOME }}

0 commit comments

Comments
 (0)