Skip to content

Commit fc63874

Browse files
committed
Remove setup-python action, let uv install the right version
Also remove setup-python caching hacks. Refs: actions/setup-python#807 actions/setup-python#762 actions/setup-python#751 Reverts: 662a971 89d73b1 e8ef6db f65666c
1 parent 64280f6 commit fc63874

7 files changed

Lines changed: 3 additions & 258 deletions

File tree

.github/workflows/autofix.yaml

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -50,42 +50,6 @@ jobs:
5050
ref: ${{ github.event.pull_request.head.sha || github.sha }}
5151
# We're going to browse all new commits.
5252
fetch-depth: 0
53-
- name: Hack setup-python cache
54-
id: setup_python_hack
55-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
56-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
57-
#
58-
# Run actions/setup-python@v5.3.0
59-
# with:
60-
# python-version: 3.13
61-
# cache: pip
62-
# cache-dependency-path: |
63-
# **/pyproject.toml
64-
# requirements/*.txt
65-
# Installed versions
66-
# Successfully set up CPython (3.13.1)
67-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
68-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
69-
#
70-
# This has been reported at: https://github.com/actions/setup-python/issues/807
71-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
72-
# or https://github.com/actions/setup-python/issues/751
73-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
74-
run: |
75-
touch ./pyproject.toml
76-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
77-
- uses: actions/setup-python@v5.3.0
78-
with:
79-
python-version: "3.13"
80-
cache: "pip"
81-
cache-dependency-path: |
82-
**/pyproject.toml
83-
*requirements.txt
84-
requirements/*.txt
85-
- name: Remove setup-python hack
86-
if: steps.setup_python_hack.outputs.tmp_deps_file
87-
run: |
88-
rm ./pyproject.toml
8953
- name: Install uv
9054
run: |
9155
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -108,38 +72,6 @@ jobs:
10872
runs-on: ubuntu-24.04
10973
steps:
11074
- uses: actions/checkout@v4.2.2
111-
- name: Hack setup-python cache
112-
id: setup_python_hack
113-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
114-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
115-
#
116-
# Run actions/setup-python@v5.3.0
117-
# with:
118-
# python-version: 3.13
119-
# cache: pip
120-
# cache-dependency-path: |
121-
# **/pyproject.toml
122-
# requirements/*.txt
123-
# Installed versions
124-
# Successfully set up CPython (3.13.1)
125-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
126-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
127-
#
128-
# This has been reported at: https://github.com/actions/setup-python/issues/807
129-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
130-
# or https://github.com/actions/setup-python/issues/751
131-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
132-
run: |
133-
touch ./pyproject.toml
134-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
135-
- uses: actions/setup-python@v5.3.0
136-
with:
137-
python-version: "3.13"
138-
cache: "pip"
139-
cache-dependency-path: |
140-
**/pyproject.toml
141-
*requirements.txt
142-
requirements/*.txt
14375
- name: Install uv
14476
run: |
14577
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -222,10 +154,6 @@ jobs:
222154
- name: Remove temporary Ruff config
223155
run: |
224156
rm ./ruff.toml
225-
- name: Remove setup-python hack
226-
if: steps.setup_python_hack.outputs.tmp_deps_file
227-
run: |
228-
rm ./pyproject.toml
229157
- name: Run blacken-docs
230158
# Ignore failing command: blacken-docs returns 1 if it finds a file that needs to be reformatted:
231159
# https://github.com/adamchainz/blacken-docs/blob/79ef671/blacken_docs.py#L207-L211
@@ -265,14 +193,6 @@ jobs:
265193
runs-on: ubuntu-24.04
266194
steps:
267195
- uses: actions/checkout@v4.2.2
268-
- uses: actions/setup-python@v5.3.0
269-
with:
270-
python-version: "3.13"
271-
cache: "pip"
272-
cache-dependency-path: |
273-
**/pyproject.toml
274-
*requirements.txt
275-
requirements/*.txt
276196
- name: Install uv
277197
run: |
278198
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -302,42 +222,6 @@ jobs:
302222
runs-on: ubuntu-24.04
303223
steps:
304224
- uses: actions/checkout@v4.2.2
305-
- name: Hack setup-python cache
306-
id: setup_python_hack
307-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
308-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
309-
#
310-
# Run actions/setup-python@v5.3.0
311-
# with:
312-
# python-version: 3.13
313-
# cache: pip
314-
# cache-dependency-path: |
315-
# **/pyproject.toml
316-
# requirements/*.txt
317-
# Installed versions
318-
# Successfully set up CPython (3.13.1)
319-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
320-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
321-
#
322-
# This has been reported at: https://github.com/actions/setup-python/issues/807
323-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
324-
# or https://github.com/actions/setup-python/issues/751
325-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
326-
run: |
327-
touch ./pyproject.toml
328-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
329-
- uses: actions/setup-python@v5.3.0
330-
with:
331-
python-version: "3.13"
332-
cache: "pip"
333-
cache-dependency-path: |
334-
**/pyproject.toml
335-
*requirements.txt
336-
requirements/*.txt
337-
- name: Remove setup-python hack
338-
if: steps.setup_python_hack.outputs.tmp_deps_file
339-
run: |
340-
rm ./pyproject.toml
341225
- name: Install uv
342226
run: |
343227
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

.github/workflows/changelog.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ jobs:
3333
- major
3434
steps:
3535
- uses: actions/checkout@v4.2.2
36-
- uses: actions/setup-python@v5.3.0
37-
with:
38-
python-version: "3.13"
39-
cache: "pip"
40-
cache-dependency-path: |
41-
**/pyproject.toml
42-
*requirements.txt
43-
requirements/*.txt
4436
- name: Install uv
4537
run: |
4638
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -110,14 +102,6 @@ jobs:
110102
# start to discuss this upstream.
111103
steps:
112104
- uses: actions/checkout@v4.2.2
113-
- uses: actions/setup-python@v5.3.0
114-
with:
115-
python-version: "3.13"
116-
cache: "pip"
117-
cache-dependency-path: |
118-
**/pyproject.toml
119-
*requirements.txt
120-
requirements/*.txt
121105
- name: Install uv
122106
run: |
123107
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

.github/workflows/docs.yaml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ jobs:
9898
with:
9999
# Fetch all history to extract all contributors.
100100
fetch-depth: 0
101-
- uses: actions/setup-python@v5.3.0
102-
with:
103-
python-version: "3.13"
104-
cache: "pip"
105-
cache-dependency-path: |
106-
**/pyproject.toml
107-
*requirements.txt
108-
requirements/*.txt
109101
- name: Install uv
110102
run: |
111103
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -149,42 +141,6 @@ jobs:
149141
ref: ${{ github.event.pull_request.head.sha || github.sha }}
150142
# We're going to browse all new commits.
151143
fetch-depth: 0
152-
- name: Hack setup-python cache
153-
id: setup_python_hack
154-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
155-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
156-
#
157-
# Run actions/setup-python@v5.3.0
158-
# with:
159-
# python-version: 3.13
160-
# cache: pip
161-
# cache-dependency-path: |
162-
# **/pyproject.toml
163-
# requirements/*.txt
164-
# Installed versions
165-
# Successfully set up CPython (3.13.1)
166-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
167-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
168-
#
169-
# This has been reported at: https://github.com/actions/setup-python/issues/807
170-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
171-
# or https://github.com/actions/setup-python/issues/751
172-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
173-
run: |
174-
touch ./pyproject.toml
175-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
176-
- uses: actions/setup-python@v5.3.0
177-
with:
178-
python-version: "3.13"
179-
cache: "pip"
180-
cache-dependency-path: |
181-
**/pyproject.toml
182-
*requirements.txt
183-
requirements/*.txt
184-
- name: Remove setup-python hack
185-
if: steps.setup_python_hack.outputs.tmp_deps_file
186-
run: |
187-
rm ./pyproject.toml
188144
- name: Install uv
189145
run: |
190146
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

.github/workflows/lint.yaml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -29,42 +29,6 @@ jobs:
2929
ref: ${{ github.event.pull_request.head.sha || github.sha }}
3030
# We're going to browse all new commits.
3131
fetch-depth: 0
32-
- name: Hack setup-python cache
33-
id: setup_python_hack
34-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
35-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
36-
#
37-
# Run actions/setup-python@v5.3.0
38-
# with:
39-
# python-version: 3.13
40-
# cache: pip
41-
# cache-dependency-path: |
42-
# **/pyproject.toml
43-
# requirements/*.txt
44-
# Installed versions
45-
# Successfully set up CPython (3.13.1)
46-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
47-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
48-
#
49-
# This has been reported at: https://github.com/actions/setup-python/issues/807
50-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
51-
# or https://github.com/actions/setup-python/issues/751
52-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
53-
run: |
54-
touch ./pyproject.toml
55-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
56-
- uses: actions/setup-python@v5.3.0
57-
with:
58-
python-version: "3.13"
59-
cache: "pip"
60-
cache-dependency-path: |
61-
**/pyproject.toml
62-
*requirements.txt
63-
requirements/*.txt
64-
- name: Remove setup-python hack
65-
if: steps.setup_python_hack.outputs.tmp_deps_file
66-
run: |
67-
rm ./pyproject.toml
6832
- name: Install uv
6933
run: |
7034
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt
@@ -111,42 +75,6 @@ jobs:
11175
runs-on: ubuntu-24.04
11276
steps:
11377
- uses: actions/checkout@v4.2.2
114-
- name: Hack setup-python cache
115-
id: setup_python_hack
116-
# XXX Create an empty pyproject.toml if this file (or any *requirements.txt) can't be found in repository.
117-
# This hack fix an issue with setup-python, which ends up with this error in non-Python repos:
118-
#
119-
# Run actions/setup-python@v5.3.0
120-
# with:
121-
# python-version: 3.13
122-
# cache: pip
123-
# cache-dependency-path: |
124-
# **/pyproject.toml
125-
# requirements/*.txt
126-
# Installed versions
127-
# Successfully set up CPython (3.13.1)
128-
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
129-
# [requirements/*.txt or **/pyproject.toml], make sure you have checked out the target repository
130-
#
131-
# This has been reported at: https://github.com/actions/setup-python/issues/807
132-
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
133-
# or https://github.com/actions/setup-python/issues/751
134-
if: hashFiles('**/pyproject.toml', '*requirements.txt', 'requirements/*.txt') == ''
135-
run: |
136-
touch ./pyproject.toml
137-
echo "tmp_deps_file=true" >> "$GITHUB_OUTPUT"
138-
- uses: actions/setup-python@v5.3.0
139-
with:
140-
python-version: "3.13"
141-
cache: "pip"
142-
cache-dependency-path: |
143-
**/pyproject.toml
144-
*requirements.txt
145-
requirements/*.txt
146-
- name: Remove setup-python hack
147-
if: steps.setup_python_hack.outputs.tmp_deps_file
148-
run: |
149-
rm ./pyproject.toml
15078
- name: Install uv
15179
run: |
15280
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

.github/workflows/release.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ jobs:
5757
- name: List all commits
5858
run: |
5959
git log --decorate=full --oneline
60-
- uses: actions/setup-python@v5.3.0
61-
with:
62-
python-version: "3.13"
63-
cache: "pip"
64-
cache-dependency-path: |
65-
**/pyproject.toml
66-
*requirements.txt
67-
requirements/*.txt
6860
- name: Install uv
6961
run: |
7062
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
if: matrix.os == 'windows-2019'
128128
uses: actions/setup-python@v5.3.0
129129
with:
130-
python-version: ${{ matrix.python-version }}
130+
python-version: "${{ matrix.python-version }}"
131131
- name: Install uv
132132
run: |
133133
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/main/requirements/uv.txt

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
> [!IMPORTANT]
66
> This version is not released yet and is under active development.
77
8-
- Use `uv` instead of GitHub action to install a specific version of Python. On all platforms but `windows-2019`.
8+
- Use `uv` instead of `setup-python` action to install Python. On all platforms but `windows-2019`.
9+
- Remove auto-generated dummy `pyproject.toml` used to hack `setup-python` caching.
910
- Run all jobs on Python 3.13.
1011
- Move coverage configuration to pytest invocation.
1112
- Do not let `uv sync` operation update the `uv.lock` file.

0 commit comments

Comments
 (0)