Skip to content

Commit 2e6c805

Browse files
committed
fix(ci): use cache suffix based on current python version
This avoids having two places to define the version.
1 parent e41a91f commit 2e6c805

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
python-version:
1919
- '3.10'
20-
- '3.13'
20+
- '3.14'
2121
env:
2222
PYTHON_VERSION: ${{ matrix.python-version }}
2323
PYTHONUNBUFFERED: 1
@@ -28,13 +28,14 @@ jobs:
2828
persist-credentials: false
2929

3030
- name: Set up Python ${{ matrix.python-version }}
31+
id: setup_python
3132
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
3233
with:
3334
python-version: ${{ matrix.python-version }}
3435

3536
- uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
3637
with:
37-
cache-suffix: ${{ matrix.python-version }}
38+
cache-suffix: ${{ steps.setup_python.outputs.python-version }}
3839

3940
- name: Install System dependencies
4041
run: |
@@ -65,14 +66,14 @@ jobs:
6566
persist-credentials: false
6667

6768
- name: Set up Python ${{ matrix.python-version }}
69+
id: setup_python
6870
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
6971
with:
7072
python-version: ${{ matrix.python-version }}
71-
allow-prereleases: true
7273

7374
- uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
7475
with:
75-
cache-suffix: ${{ matrix.python-version }}
76+
cache-suffix: ${{ steps.setup_python.outputs.python-version }}
7677

7778
- name: Install System dependencies
7879
run: |

.github/workflows/ty.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
persist-credentials: false
1616

1717
- name: Set up Python
18+
id: setup_python
1819
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
1920
with:
20-
python-version: 3.13 || 3.14
21+
python-version: 3.14
2122

2223
- uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0
2324
with:
24-
cache-suffix: 3.13
25+
cache-suffix: ${{ steps.setup_python.outputs.python-version }}
2526

2627
- name: Install System dependencies
2728
run: |

0 commit comments

Comments
 (0)