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,7 +180,7 @@ 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
@@ -174,24 +201,28 @@ jobs:
174201 uses : deadsnakes/action@v3.2.0 # staticx doesn't work with python installed by setup-python action
175202 with :
176203 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
204+ - uses : astral-sh/setup-uv@v7
205+ with :
206+ version : ${{ env.UV_VERSION }}
207+ enable-cache : true
177208 - name : Install dependencies
178209 run : |
179210 sudo apt-get -y update
180211 sudo apt-get -y install patchelf scons
181- python -m pip install --upgrade nox pdm==2.26.4
212+ uv sync --python ${{ env.PYTHON_DEFAULT_VERSION }} --locked --group nox
182213 git config --global --add safe.directory '*'
183214 - name : Bundle the distribution
184215 id : bundle
185216 shell : bash
186- run : nox -vs bundle
217+ run : uv run nox -vs bundle
187218 - name : Generate hashes
188219 id : hashes
189- run : nox -vs make_dist_digest
220+ run : uv run nox -vs make_dist_digest
190221 - 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"
222+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
192223 - name : Run integration tests (with secrets)
193224 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
225+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
195226 - name : Upload assets
196227 if : failure()
197228 uses : actions/upload-artifact@v4
@@ -216,20 +247,25 @@ jobs:
216247 uses : actions/setup-python@v6
217248 with :
218249 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
250+ - uses : astral-sh/setup-uv@v7
251+ with :
252+ version : ${{ env.UV_VERSION }}
253+ enable-cache : true
219254 - name : Install dependencies
220- run : python -m pip install --upgrade nox pdm==2.26.4
255+ run : |
256+ uv sync --locked --group nox
221257 - name : Bundle the distribution
222258 id : bundle
223259 shell : bash
224- run : nox -vs bundle
260+ run : uv run nox -vs bundle
225261 - name : Generate hashes
226262 id : hashes
227- run : nox -vs make_dist_digest
263+ run : uv run nox -vs make_dist_digest
228264 - 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"
265+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "not require_secrets"
230266 - name : Run integration tests (with secrets)
231267 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
268+ run : uv run nox -vs integration -p ${{ env.PYTHON_DEFAULT_VERSION }} -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup
233269 - name : Upload assets
234270 if : failure()
235271 uses : actions/upload-artifact@v4
@@ -250,12 +286,16 @@ jobs:
250286 uses : actions/setup-python@v6
251287 with :
252288 python-version : ${{ env.PYTHON_DEFAULT_VERSION }}
289+ - uses : astral-sh/setup-uv@v7
290+ with :
291+ version : ${{ env.UV_VERSION }}
292+ enable-cache : true
253293 - name : Install dependencies
254294 env :
255295 DEBIAN_FRONTEND : noninteractive
256296 run : |
257297 sudo apt-get update -y
258298 sudo apt-get install -y graphviz plantuml
259- python -m pip install --upgrade nox pdm==2.26.4
299+ uv sync --locked --group nox
260300 - name : Build the docs
261- run : nox --non-interactive -vs doc
301+ run : uv run nox --non-interactive -vs doc
0 commit comments