88
99env :
1010 PYTHON_DEFAULT_VERSION : " 3.12"
11+ UV_VERSION : " 0.8.24"
1112
1213jobs :
1314 lint :
@@ -24,16 +25,21 @@ jobs:
2425 uses : actions/setup-python@v6
2526 with :
2627 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
28+ - uses : astral-sh/setup-uv@v7
29+ with :
30+ version : ${{ env.UV_VERSION }}
31+ enable-cache : true
2732 - name : Install dependencies
28- run : python -m pip install --upgrade nox pdm==2.26.4
33+ run : |
34+ uv sync --locked --group nox
2935 - name : Run linters
30- run : nox -vs lint
36+ run : uv run nox -vs lint
3137 - name : Validate new changelog entries
3238 if : (contains(github.event.pull_request.labels.*.name, '-changelog') == false) && (github.event.pull_request.base.ref != '')
3339 run : if [ -z "$(git diff --diff-filter=A --name-only origin/${{ github.event.pull_request.base.ref }} changelog.d)" ];
3440 then echo no changelog item added; exit 1; fi
3541 - name : Changelog validation
36- run : nox -vs towncrier_check
42+ run : uv run nox -vs towncrier_check
3743 build :
3844 timeout-minutes : 30
3945 needs : lint
@@ -46,10 +52,15 @@ jobs:
4652 uses : actions/setup-python@v6
4753 with :
4854 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
55+ - uses : astral-sh/setup-uv@v7
56+ with :
57+ version : ${{ env.UV_VERSION }}
58+ enable-cache : true
4959 - name : Install dependencies
50- run : python -m pip install --upgrade nox pdm==2.26.4
60+ run : |
61+ uv sync --locked --group nox
5162 - name : Build the distribution
52- run : nox -vs build
63+ run : uv run nox -vs build
5364 cleanup_buckets :
5465 timeout-minutes : 30
5566 needs : lint
@@ -68,12 +79,18 @@ jobs:
6879 with :
6980 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
7081 cache : " pip"
82+ - uses : astral-sh/setup-uv@v7
83+ if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
84+ with :
85+ version : ${{ env.UV_VERSION }}
86+ enable-cache : true
7187 - name : Install dependencies
7288 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
73- run : python -m pip install --upgrade nox pdm==2.26.4
89+ run : |
90+ uv sync --locked --group nox
7491 - name : Find and remove old buckets
7592 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
76- run : nox -vs cleanup_buckets
93+ run : uv run nox -vs cleanup_buckets
7794 test :
7895 timeout-minutes : 90
7996 needs : cleanup_buckets
@@ -100,6 +117,10 @@ jobs:
100117 uses : actions/setup-python@v6
101118 with :
102119 python-version : ${{ matrix.python-version }}
120+ - uses : astral-sh/setup-uv@v7
121+ with :
122+ version : ${{ env.UV_VERSION }}
123+ enable-cache : true
103124 - name : Install test binary dependencies
104125 if : startsWith(matrix.os, 'ubuntu')
105126 run : |
@@ -111,15 +132,16 @@ jobs:
111132 run : |
112133 brew install fish
113134 - name : Install dependencies
114- run : python -m pip install --upgrade nox pdm==2.26.4
135+ run : |
136+ uv sync --locked --group nox
115137 - name : Run unit tests
116- run : nox -vs unit -p ${{ matrix.python-version }}
138+ run : uv run nox -vs unit -p ${{ matrix.python-version }}
117139 - name : Run integration tests (without secrets)
118- run : nox -vs integration -p ${{ matrix.python-version }} -- -m "not require_secrets"
140+ run : uv run nox -vs integration -p ${{ matrix.python-version }} -- -m "not require_secrets"
119141 - name : Run integration tests (with secrets)
120142 # Limit CI workload by running integration tests with secrets only on edge Python versions.
121143 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.9", "pypy3.10", "3.14"]'), matrix.python-version) }}
122- run : nox -vs integration -p ${{ matrix.python-version }} -- -m "require_secrets" --cleanup
144+ run : uv run nox -vs integration -p ${{ matrix.python-version }} -- -m "require_secrets" --cleanup
123145 test-docker :
124146 timeout-minutes : 90
125147 needs : cleanup_buckets
@@ -136,10 +158,15 @@ jobs:
136158 uses : actions/setup-python@v6
137159 with :
138160 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
161+ - uses : astral-sh/setup-uv@v7
162+ with :
163+ version : ${{ env.UV_VERSION }}
164+ enable-cache : true
139165 - name : Install dependencies
140- run : python -m pip install --upgrade nox pdm==2.26.4
166+ run : |
167+ uv sync --locked --group nox
141168 - name : Generate Dockerfile
142- run : nox -vs generate_dockerfile
169+ run : uv run nox -vs generate_dockerfile
143170 - name : Set up QEMU
144171 uses : docker/setup-qemu-action@v3
145172 - name : Set up Docker Buildx
@@ -153,13 +180,14 @@ jobs:
153180 platforms : linux/amd64
154181 - name : Run tests with docker
155182 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
156- run : nox -vs docker_test -- backblazeit/b2:test
183+ run : uv run nox -vs docker_test -- backblazeit/b2:test
157184 test-linux-bundle :
158185 timeout-minutes : 90
159186 needs : cleanup_buckets
160187 env :
161188 B2_TEST_APPLICATION_KEY : ${{ secrets.B2_TEST_APPLICATION_KEY }}
162189 B2_TEST_APPLICATION_KEY_ID : ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
190+ UV_PYTHON : ${{ env.PYTHON_DEFAULT_VERSION }}
163191 WORKFLOW_ID : ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
164192 runs-on : ${{ matrix.os }}
165193 strategy :
@@ -174,24 +202,28 @@ jobs:
174202 uses : deadsnakes/action@v3.2.0 # staticx doesn't work with python installed by setup-python action
175203 with :
176204 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
205+ - uses : astral-sh/setup-uv@v7
206+ with :
207+ version : ${{ env.UV_VERSION }}
208+ enable-cache : true
177209 - name : Install dependencies
178210 run : |
179211 sudo apt-get -y update
180212 sudo apt-get -y install patchelf scons
181- python -m pip install --upgrade nox pdm==2.26.4
213+ uv sync --locked --group nox
182214 git config --global --add safe.directory '*'
183215 - name : Bundle the distribution
184216 id : bundle
185217 shell : bash
186- run : nox -vs bundle
218+ run : uv run nox -vs bundle
187219 - name : Generate hashes
188220 id : hashes
189- run : nox -vs make_dist_digest
221+ run : uv run nox -vs make_dist_digest
190222 - name : Run integration tests (without secrets)
191- run : nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
223+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
192224 - name : Run integration tests (with secrets)
193225 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
194- run : nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
226+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
195227 - name : Upload assets
196228 if : failure()
197229 uses : actions/upload-artifact@v4
@@ -206,6 +238,7 @@ jobs:
206238 env :
207239 B2_TEST_APPLICATION_KEY : ${{ secrets.B2_TEST_APPLICATION_KEY }}
208240 B2_TEST_APPLICATION_KEY_ID : ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
241+ UV_PYTHON : ${{ env.PYTHON_DEFAULT_VERSION }}
209242 WORKFLOW_ID : ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
210243 runs-on : windows-2022 # keep the version aligned with cd.yml
211244 steps :
@@ -216,20 +249,25 @@ jobs:
216249 uses : actions/setup-python@v6
217250 with :
218251 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
252+ - uses : astral-sh/setup-uv@v7
253+ with :
254+ version : ${{ env.UV_VERSION }}
255+ enable-cache : true
219256 - name : Install dependencies
220- run : python -m pip install --upgrade nox pdm==2.26.4
257+ run : |
258+ uv sync --locked --group nox
221259 - name : Bundle the distribution
222260 id : bundle
223261 shell : bash
224- run : nox -vs bundle
262+ run : uv run nox -vs bundle
225263 - name : Generate hashes
226264 id : hashes
227- run : nox -vs make_dist_digest
265+ run : uv run nox -vs make_dist_digest
228266 - name : Run integration tests (without secrets)
229- run : nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
267+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
230268 - name : Run integration tests (with secrets)
231269 if : ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }}
232- run : nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
270+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
233271 - name : Upload assets
234272 if : failure()
235273 uses : actions/upload-artifact@v4
@@ -250,12 +288,16 @@ jobs:
250288 uses : actions/setup-python@v6
251289 with :
252290 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
291+ - uses : astral-sh/setup-uv@v7
292+ with :
293+ version : ${{ env.UV_VERSION }}
294+ enable-cache : true
253295 - name : Install dependencies
254296 env :
255297 DEBIAN_FRONTEND : noninteractive
256298 run : |
257299 sudo apt-get update -y
258300 sudo apt-get install -y graphviz plantuml
259- python -m pip install --upgrade nox pdm==2.26.4
301+ uv sync --locked --group nox
260302 - name : Build the docs
261- run : nox --non-interactive -vs doc
303+ run : uv run nox --non-interactive -vs doc
0 commit comments