Skip to content

Commit 08b73a4

Browse files
mishushakovclaudecursoragent
authored
Update GitHub workflows to Python 3.13 (#194)
* Update GitHub workflows to Python 3.13 Upgrade all Python workflow jobs from Python 3.12 (and 3.10 for linting) to Python 3.13, and update setup-python action from v4 to v6 to support the new version. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * Use .tool-versions for Python and Poetry versions in workflows Add a .tool-versions file (python 3.13, poetry 1.8.1) and use wistia/parse-tool-versions to read versions in all workflows, replacing hardcoded version strings with env var references. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Downgrade Python version from 3.13 to 3.10 * Fix Python version divergence in build_prod_template.yml Update build_prod_template.yml to use TOOL_VERSION_PYTHON from .tool-versions instead of hardcoded '3.13', matching the pattern used in build_test_template.yml. This ensures consistency between test and production template builds. Co-authored-by: Mish Ushakov <mishushakov@users.noreply.github.com> --------- Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Mish Ushakov <mishushakov@users.noreply.github.com>
1 parent 4e0369c commit 08b73a4

File tree

9 files changed

+106
-25
lines changed

9 files changed

+106
-25
lines changed

.github/workflows/build_prod_template.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,17 @@ jobs:
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
26+
27+
- name: Parse .tool-versions
28+
uses: wistia/parse-tool-versions@v2.1.1
29+
with:
30+
filename: '.tool-versions'
31+
uppercase: 'true'
32+
prefix: 'tool_version_'
33+
2634
- uses: actions/setup-python@v6
2735
with:
28-
python-version: '3.13'
36+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
2937

3038
- name: Install development dependencies
3139
working-directory: ./template

.github/workflows/build_test_template.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ jobs:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
2929

30+
- name: Parse .tool-versions
31+
uses: wistia/parse-tool-versions@v2.1.1
32+
with:
33+
filename: '.tool-versions'
34+
uppercase: 'true'
35+
prefix: 'tool_version_'
36+
3037
- name: Set package version
3138
working-directory: ./template
3239
run: |
@@ -36,7 +43,7 @@ jobs:
3643
3744
- uses: actions/setup-python@v6
3845
with:
39-
python-version: '3.13'
46+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
4047

4148
- name: Install development dependencies
4249
working-directory: ./template

.github/workflows/charts_tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,22 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919

20+
- name: Parse .tool-versions
21+
uses: wistia/parse-tool-versions@v2.1.1
22+
with:
23+
filename: '.tool-versions'
24+
uppercase: 'true'
25+
prefix: 'tool_version_'
26+
2027
- name: Set up Python
21-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v6
2229
with:
23-
python-version: '3.12'
30+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
2431

2532
- name: Install and configure Poetry
2633
uses: snok/install-poetry@v1
2734
with:
28-
version: 1.5.1
35+
version: '${{ env.TOOL_VERSION_POETRY }}'
2936
virtualenvs-create: true
3037
virtualenvs-in-project: true
3138
installer-parallel: true

.github/workflows/lint.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ jobs:
1515
- name: Checkout Repo
1616
uses: actions/checkout@v4
1717

18+
- name: Parse .tool-versions
19+
uses: wistia/parse-tool-versions@v2.1.1
20+
with:
21+
filename: '.tool-versions'
22+
uppercase: 'true'
23+
prefix: 'tool_version_'
24+
1825
- uses: pnpm/action-setup@v4
1926
with:
2027
version: 9.15.9
@@ -34,14 +41,14 @@ jobs:
3441
run: pnpm install --frozen-lockfile
3542

3643
- name: Set up Python
37-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v6
3845
with:
39-
python-version: '3.10'
46+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
4047

4148
- name: Install and configure Poetry
4249
uses: snok/install-poetry@v1
4350
with:
44-
version: 1.5.1
51+
version: '${{ env.TOOL_VERSION_POETRY }}'
4552
virtualenvs-create: true
4653
virtualenvs-in-project: true
4754
installer-parallel: true

.github/workflows/performance_tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,22 @@ jobs:
3131
- name: Checkout repository
3232
uses: actions/checkout@v4
3333

34+
- name: Parse .tool-versions
35+
uses: wistia/parse-tool-versions@v2.1.1
36+
with:
37+
filename: '.tool-versions'
38+
uppercase: 'true'
39+
prefix: 'tool_version_'
40+
3441
- name: Set up Python
35-
uses: actions/setup-python@v4
42+
uses: actions/setup-python@v6
3643
with:
37-
python-version: '3.12'
44+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
3845

3946
- name: Install and configure Poetry
4047
uses: snok/install-poetry@v1
4148
with:
42-
version: 1.5.1
49+
version: '${{ env.TOOL_VERSION_POETRY }}'
4350
virtualenvs-create: true
4451
virtualenvs-in-project: true
4552
installer-parallel: true

.github/workflows/python_tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,22 @@ jobs:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
2929

30+
- name: Parse .tool-versions
31+
uses: wistia/parse-tool-versions@v2.1.1
32+
with:
33+
filename: '.tool-versions'
34+
uppercase: 'true'
35+
prefix: 'tool_version_'
36+
3037
- name: Set up Python
31-
uses: actions/setup-python@v4
38+
uses: actions/setup-python@v6
3239
with:
33-
python-version: '3.12'
40+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
3441

3542
- name: Install and configure Poetry
3643
uses: snok/install-poetry@v1
3744
with:
38-
version: 1.5.1
45+
version: '${{ env.TOOL_VERSION_POETRY }}'
3946
virtualenvs-create: true
4047
virtualenvs-in-project: true
4148
installer-parallel: true

.github/workflows/release.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,28 @@ jobs:
119119
- name: Checkout Repo
120120
uses: actions/checkout@v4
121121

122+
- name: Parse .tool-versions
123+
uses: wistia/parse-tool-versions@v2.1.1
124+
with:
125+
filename: '.tool-versions'
126+
uppercase: 'true'
127+
prefix: 'tool_version_'
128+
122129
- name: Install pnpm
123130
uses: pnpm/action-setup@v3
124131
id: pnpm-install
125132
with:
126133
version: 9.5
127134

128135
- name: Set up Python
129-
uses: actions/setup-python@v4
136+
uses: actions/setup-python@v6
130137
with:
131-
python-version: "3.12"
138+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
132139

133140
- name: Install and configure Poetry
134141
uses: snok/install-poetry@v1
135142
with:
136-
version: 1.5.1
143+
version: '${{ env.TOOL_VERSION_POETRY }}'
137144
virtualenvs-create: true
138145
virtualenvs-in-project: true
139146
installer-parallel: true
@@ -179,6 +186,13 @@ jobs:
179186
- name: Checkout repository
180187
uses: actions/checkout@v4
181188

189+
- name: Parse .tool-versions
190+
uses: wistia/parse-tool-versions@v2.1.1
191+
with:
192+
filename: '.tool-versions'
193+
uppercase: 'true'
194+
prefix: 'tool_version_'
195+
182196
- name: Set up Docker Buildx
183197
uses: docker/setup-buildx-action@v3
184198

@@ -202,7 +216,7 @@ jobs:
202216
203217
- uses: actions/setup-python@v6
204218
with:
205-
python-version: '3.13'
219+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
206220

207221
- name: Install development dependencies
208222
working-directory: ./template
@@ -227,9 +241,17 @@ jobs:
227241
steps:
228242
- name: Checkout repository
229243
uses: actions/checkout@v4
244+
245+
- name: Parse .tool-versions
246+
uses: wistia/parse-tool-versions@v2.1.1
247+
with:
248+
filename: '.tool-versions'
249+
uppercase: 'true'
250+
prefix: 'tool_version_'
251+
230252
- uses: actions/setup-python@v6
231253
with:
232-
python-version: '3.13'
254+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
233255

234256
- name: Install development dependencies
235257
working-directory: ./template
@@ -284,15 +306,22 @@ jobs:
284306
with:
285307
token: ${{ steps.app-token.outputs.token }}
286308

309+
- name: Parse .tool-versions
310+
uses: wistia/parse-tool-versions@v2.1.1
311+
with:
312+
filename: '.tool-versions'
313+
uppercase: 'true'
314+
prefix: 'tool_version_'
315+
287316
- name: Set up Python
288-
uses: actions/setup-python@v4
317+
uses: actions/setup-python@v6
289318
with:
290-
python-version: "3.12"
319+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
291320

292321
- name: Install and configure Poetry
293322
uses: snok/install-poetry@v1
294323
with:
295-
version: 1.8.1
324+
version: '${{ env.TOOL_VERSION_POETRY }}'
296325
virtualenvs-create: true
297326
virtualenvs-in-project: true
298327
installer-parallel: true

.github/workflows/release_candidates.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
with:
1818
ref: ${{ github.head_ref }}
1919

20+
- name: Parse .tool-versions
21+
uses: wistia/parse-tool-versions@v2.1.1
22+
with:
23+
filename: '.tool-versions'
24+
uppercase: 'true'
25+
prefix: 'tool_version_'
26+
2027
- uses: pnpm/action-setup@v3
2128
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
2229
with:
@@ -58,16 +65,16 @@ jobs:
5865
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5966

6067
- name: Set up Python
61-
uses: actions/setup-python@v4
68+
uses: actions/setup-python@v6
6269
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
6370
with:
64-
python-version: "3.12"
71+
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
6572

6673
- name: Install and configure Poetry
6774
uses: snok/install-poetry@v1
6875
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
6976
with:
70-
version: 1.8.1
77+
version: '${{ env.TOOL_VERSION_POETRY }}'
7178
virtualenvs-create: true
7279
virtualenvs-in-project: true
7380
installer-parallel: true

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python 3.10
2+
poetry 1.8.1

0 commit comments

Comments
 (0)