@@ -23,10 +23,11 @@ jobs:
2323 name : Cache identify
2424 outputs :
2525 cache-key : ${{ steps.set-key.outputs.cache-key }}
26+ python-version : ${{ steps.python.outputs.python-version}} # Ensure all runners use THIS minor version
2627 steps :
2728 - name : Check out committed code
2829 uses : actions/checkout@v5
29- - name : Set up Python ${{ env.DEFAULT_PYTHON }}
30+ - name : Set up Python and determine minor version for ${{ env.DEFAULT_PYTHON }}
3031 id : python
3132 uses : actions/setup-python@v5
3233 with :
5051 with :
5152 cache-key : ${{ needs.cache.outputs.cache-key }}
5253 fail-on-miss : false # First time create cache (if not already exists)
53- python-version : ${{ env.DEFAULT_PYTHON }}
54+ python-version : ${{ needs.cache.outputs.python-version }}
5455 venv-dir : ${{ env.VENV }}
5556 precommit-home : ${{ env.PRE_COMMIT_HOME }}
5657
7071 uses : plugwise/gh-actions/restore-venv@v1
7172 with :
7273 cache-key : ${{ needs.cache.outputs.cache-key }}
73- python-version : ${{ env.DEFAULT_PYTHON }}
74+ python-version : ${{ needs.cache.outputs.python-version }}
7475 venv-dir : ${{ env.VENV }}
7576 precommit-home : ${{ env.PRE_COMMIT_HOME }}
7677 - name : Ruff (with fix)
@@ -106,7 +107,7 @@ jobs:
106107 uses : plugwise/gh-actions/restore-venv@v1
107108 with :
108109 cache-key : ${{ needs.cache.outputs.cache-key }}
109- python-version : ${{ env.DEFAULT_PYTHON }}
110+ python-version : ${{ needs.cache.outputs.python-version }}
110111 venv-dir : ${{ env.VENV }}
111112 precommit-home : ${{ env.PRE_COMMIT_HOME }}
112113 - name : Verify commit
@@ -136,12 +137,17 @@ jobs:
136137 steps :
137138 - name : Check out committed code
138139 uses : actions/checkout@v5
140+ - name : Set up Python ${{ matrix.python-version }}
141+ id : python
142+ uses : actions/setup-python@v5
143+ with :
144+ python-version : ${{ matrix.python-version }}
139145 - name : Restore cached environment
140146 id : cache-reuse
141147 uses : plugwise/gh-actions/restore-venv@v1
142148 with :
143149 cache-key : ${{ needs.cache.outputs.cache-key }}
144- python-version : ${{ env.DEFAULT_PYTHON }}
150+ python-version : ${{ steps.python.outputs.python-version }} # Force to installed python minor$
145151 venv-dir : ${{ env.VENV }}
146152 precommit-home : ${{ env.PRE_COMMIT_HOME }}
147153 - name : Run all tests
@@ -173,7 +179,7 @@ jobs:
173179 uses : plugwise/gh-actions/restore-venv@v1
174180 with :
175181 cache-key : ${{ needs.cache.outputs.cache-key }}
176- python-version : ${{ env.DEFAULT_PYTHON }}
182+ python-version : ${{ needs.cache.outputs.python-version }}
177183 venv-dir : ${{ env.VENV }}
178184 precommit-home : ${{ env.PRE_COMMIT_HOME }}
179185 - name : Run mypy
@@ -218,7 +224,7 @@ jobs:
218224 uses : plugwise/gh-actions/restore-venv@v1
219225 with :
220226 cache-key : ${{ needs.cache.outputs.cache-key }}
221- python-version : ${{ env.DEFAULT_PYTHON }}
227+ python-version : ${{ needs.cache.outputs.python-version }}
222228 venv-dir : ${{ env.VENV }}
223229 precommit-home : ${{ env.PRE_COMMIT_HOME }}
224230 - name : Download all coverage artifacts
@@ -300,7 +306,7 @@ jobs:
300306 uses : plugwise/gh-actions/restore-venv@v1
301307 with :
302308 cache-key : ${{ needs.cache.outputs.cache-key }}
303- python-version : ${{ env.DEFAULT_PYTHON }}
309+ python-version : ${{ needs.cache.outputs.python-version }}
304310 venv-dir : ${{ env.VENV }}
305311 precommit-home : ${{ env.PRE_COMMIT_HOME }}
306312 - name : Run complexity report (click to view details)
0 commit comments