Skip to content

Commit d500eea

Browse files
committed
Force python minor version
1 parent 7289ffa commit d500eea

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/verify.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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-verseion}} # 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:
@@ -52,7 +53,7 @@ jobs:
5253
fail-on-miss: false # First time create cache (if not already exists)
5354
python-version: ${{ env.DEFAULT_PYTHON }}
5455
venv-dir: ${{ env.VENV }}
55-
precommit-home: ${{ env.PRE_COMMIT_HOME }}
56+
precommit-home: ${{ needs.cache.outputs.python-version }}
5657

5758
ruff:
5859
runs-on: ubuntu-latest
@@ -70,7 +71,7 @@ jobs:
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
@@ -296,7 +302,7 @@ jobs:
296302
uses: plugwise/gh-actions/restore-venv@v1
297303
with:
298304
cache-key: ${{ needs.cache.outputs.cache-key }}
299-
python-version: ${{ env.DEFAULT_PYTHON }}
305+
python-version: ${{ needs.cache.outputs.python-version}}
300306
venv-dir: ${{ env.VENV }}
301307
precommit-home: ${{ env.PRE_COMMIT_HOME }}
302308
- name: Run complexity report (click to view details)

0 commit comments

Comments
 (0)