|
37 | 37 | run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml" |
38 | 38 | - name: Compute cache key |
39 | 39 | 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" |
41 | 41 |
|
42 | 42 | # Prepare default python version environment |
43 | 43 | prepare: |
|
49 | 49 | id: cache-reuse |
50 | 50 | uses: plugwise/gh-actions/prepare-python-and-code@v1 |
51 | 51 | with: |
52 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 52 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
53 | 53 | fail-on-miss: false # First time create cache (if not already exists) |
54 | 54 | python-version: ${{ needs.cache.outputs.python-version }} |
55 | 55 | venv-dir: ${{ env.VENV }} |
|
70 | 70 | id: cache-reuse |
71 | 71 | uses: plugwise/gh-actions/restore-venv@v1 |
72 | 72 | with: |
73 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 73 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
74 | 74 | python-version: ${{ needs.cache.outputs.python-version}} |
75 | 75 | venv-dir: ${{ env.VENV }} |
76 | 76 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
@@ -106,7 +106,7 @@ jobs: |
106 | 106 | id: cache-reuse |
107 | 107 | uses: plugwise/gh-actions/restore-venv@v1 |
108 | 108 | with: |
109 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 109 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
110 | 110 | python-version: ${{ needs.cache.outputs.python-version}} |
111 | 111 | venv-dir: ${{ env.VENV }} |
112 | 112 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
@@ -147,7 +147,7 @@ jobs: |
147 | 147 | uses: plugwise/gh-actions/restore-venv@v1 |
148 | 148 | with: |
149 | 149 | 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 }} |
151 | 151 | python-version: ${{ matrix.python-version }} # Force to installed python minor |
152 | 152 | venv-dir: ${{ env.VENV }} |
153 | 153 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
@@ -179,7 +179,7 @@ jobs: |
179 | 179 | id: cache-reuse |
180 | 180 | uses: plugwise/gh-actions/restore-venv@v1 |
181 | 181 | with: |
182 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 182 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
183 | 183 | python-version: ${{ needs.cache.outputs.python-version}} |
184 | 184 | venv-dir: ${{ env.VENV }} |
185 | 185 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
@@ -224,7 +224,7 @@ jobs: |
224 | 224 | id: cache-reuse |
225 | 225 | uses: plugwise/gh-actions/restore-venv@v1 |
226 | 226 | with: |
227 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 227 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
228 | 228 | python-version: ${{ needs.cache.outputs.python-version}} |
229 | 229 | venv-dir: ${{ env.VENV }} |
230 | 230 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
@@ -306,7 +306,7 @@ jobs: |
306 | 306 | id: cache-reuse |
307 | 307 | uses: plugwise/gh-actions/restore-venv@v1 |
308 | 308 | with: |
309 | | - cache-key: ${{ needs.cache.outputs.cache-key }} |
| 309 | + cache-key: ${{ needs.cache.outputs.cache-key }}-${{ needs.cache.outputs.python-version }} |
310 | 310 | python-version: ${{ needs.cache.outputs.python-version}} |
311 | 311 | venv-dir: ${{ env.VENV }} |
312 | 312 | precommit-home: ${{ env.PRE_COMMIT_HOME }} |
|
0 commit comments