@@ -37,11 +37,13 @@ jobs:
37
37
enable-cache : true
38
38
39
39
- name : install deps
40
- run : uv sync --group testing
40
+ run : |
41
+ uv sync --group testing --no-install-project
42
+ uv pip install maturin pip
41
43
42
44
- run : rustc --version --verbose
43
45
44
- - run : uv pip install -e .
46
+ - run : uv run maturin develop
45
47
env :
46
48
RUST_BACKTRACE : 1
47
49
RUSTFLAGS : ' -C instrument-coverage'
@@ -208,7 +210,7 @@ jobs:
208
210
uses : Swatinem/rust-cache@v2
209
211
210
212
- name : install deps
211
- run : uv sync --group testing
213
+ run : uv sync --group testing --no-install-project
212
214
213
215
- run : make build-dev
214
216
@@ -243,21 +245,20 @@ jobs:
243
245
with :
244
246
enable-cache : true
245
247
246
- - name : set up venv
248
+ - name : install deps
247
249
run : |
248
- uv venv
249
- uv pip install -r pydantic/pyproject.toml --extra timezone
250
+ uv sync --extra timezone
250
251
uv pip install maturin pip
251
-
252
- - name : install pydantic-core
253
- run : make build-dev
254
- working-directory : pydantic-core
252
+ uv run bash -c 'cd ../pydantic-core && maturin develop'
253
+ working-directory : pydantic
255
254
256
255
- run : uv --version && uv pip list
256
+ working-directory : pydantic
257
257
258
258
# Run pytest with lax xfail because we often add tests to pydantic
259
259
# which xfail on a pending release of pydantic-core
260
- - run : uv run pytest --override-ini=xfail_strict=False pydantic/tests
260
+ - run : uv run pytest --override-ini=xfail_strict=False tests
261
+ working-directory : pydantic
261
262
env :
262
263
PYDANTIC_PRIVATE_ALLOW_UNHANDLED_SCHEMA_TYPES : 1
263
264
@@ -290,7 +291,7 @@ jobs:
290
291
291
292
- name : install deps
292
293
run : |
293
- uv sync --group linting
294
+ uv sync --group linting --no-install-project
294
295
make build-dev
295
296
uv pip freeze
296
297
@@ -349,7 +350,7 @@ jobs:
349
350
enable-cache : true
350
351
351
352
- name : install deps
352
- run : uv sync --python 3.12 --group wasm
353
+ run : uv sync --group wasm --no-install-project
353
354
354
355
- name : build wheels
355
356
run : make build-wasm
@@ -371,6 +372,9 @@ jobs:
371
372
name : wasm_wheels
372
373
path : dist
373
374
375
+ env :
376
+ UV_PYTHON : 3.12
377
+
374
378
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
375
379
check :
376
380
if : always()
@@ -540,11 +544,10 @@ jobs:
540
544
steps :
541
545
- uses : actions/checkout@v4
542
546
543
- - name : set up python
544
- uses : actions /setup-python@v5
547
+ - name : install uv
548
+ uses : astral-sh /setup-uv@v3
545
549
with :
546
- python-version : ${{ matrix.interpreter }}
547
- allow-prereleases : true
550
+ enable-cache : true
548
551
549
552
- name : install rust stable
550
553
id : rust-toolchain
@@ -579,10 +582,9 @@ jobs:
579
582
580
583
- name : generate pgo data
581
584
run : |
582
- pip install -U pip
583
- pip install -r tests/requirements.txt
584
- pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
585
- pytest tests/benchmarks
585
+ uv sync --group testing --no-install-project
586
+ uv pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
587
+ uv run pytest tests/benchmarks
586
588
rustup run ${{ steps.rust-toolchain.outputs.name }} bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
587
589
588
590
- name : merge pgo data
@@ -608,6 +610,9 @@ jobs:
608
610
name : pypi_files_${{ matrix.os }}_${{ matrix.interpreter }}
609
611
path : dist
610
612
613
+ env :
614
+ UV_PYTHON : ${{ matrix.interpreter }}
615
+
611
616
inspect-pypi-assets :
612
617
needs : [build, build-sdist, build-pgo]
613
618
runs-on : ubuntu-latest
@@ -682,12 +687,11 @@ jobs:
682
687
fi
683
688
run : |
684
689
set -x
685
- python3 -m venv venv
686
- source venv/bin/activate
687
- python3 -m pip install -r tests/requirements.txt
688
- python3 -m pip install pydantic-core --no-index --no-deps --find-links dist --force-reinstall
689
- python3 -m pytest --ignore=tests/test_docstrings.py
690
- python3 -c 'import pydantic_core._pydantic_core; print(pydantic_core._pydantic_core.__version__)'
690
+ curl -LsSf https://astral.sh/uv/install.sh | sh
691
+ uv sync --group testing
692
+ uv pip install pydantic-core --no-index --no-deps --find-links dist --force-reinstall
693
+ uv run pytest --ignore=tests/test_docstrings.py
694
+ uv run -c 'import pydantic_core._pydantic_core; print(pydantic_core._pydantic_core.__version__)'
691
695
692
696
test-builds-os :
693
697
name : test build on ${{ matrix.os }}
0 commit comments