@@ -37,11 +37,13 @@ jobs:
3737 enable-cache : true
3838
3939 - 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
4143
4244 - run : rustc --version --verbose
4345
44- - run : uv pip install -e .
46+ - run : uv run maturin develop
4547 env :
4648 RUST_BACKTRACE : 1
4749 RUSTFLAGS : ' -C instrument-coverage'
@@ -208,7 +210,7 @@ jobs:
208210 uses : Swatinem/rust-cache@v2
209211
210212 - name : install deps
211- run : uv sync --group testing
213+ run : uv sync --group testing --no-install-project
212214
213215 - run : make build-dev
214216
@@ -243,21 +245,20 @@ jobs:
243245 with :
244246 enable-cache : true
245247
246- - name : set up venv
248+ - name : install deps
247249 run : |
248- uv venv
249- uv pip install -r pydantic/pyproject.toml --extra timezone
250+ uv sync --extra timezone
250251 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
255254
256255 - run : uv --version && uv pip list
256+ working-directory : pydantic
257257
258258 # Run pytest with lax xfail because we often add tests to pydantic
259259 # 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
261262 env :
262263 PYDANTIC_PRIVATE_ALLOW_UNHANDLED_SCHEMA_TYPES : 1
263264
@@ -290,7 +291,7 @@ jobs:
290291
291292 - name : install deps
292293 run : |
293- uv sync --group linting
294+ uv sync --group linting --no-install-project
294295 make build-dev
295296 uv pip freeze
296297
@@ -349,7 +350,7 @@ jobs:
349350 enable-cache : true
350351
351352 - name : install deps
352- run : uv sync --python 3.12 --group wasm
353+ run : uv sync --group wasm --no-install-project
353354
354355 - name : build wheels
355356 run : make build-wasm
@@ -371,6 +372,9 @@ jobs:
371372 name : wasm_wheels
372373 path : dist
373374
375+ env :
376+ UV_PYTHON : 3.12
377+
374378 # https://github.com/marketplace/actions/alls-green#why used for branch protection checks
375379 check :
376380 if : always()
@@ -540,11 +544,10 @@ jobs:
540544 steps :
541545 - uses : actions/checkout@v4
542546
543- - name : set up python
544- uses : actions /setup-python@v5
547+ - name : install uv
548+ uses : astral-sh /setup-uv@v3
545549 with :
546- python-version : ${{ matrix.interpreter }}
547- allow-prereleases : true
550+ enable-cache : true
548551
549552 - name : install rust stable
550553 id : rust-toolchain
@@ -579,10 +582,9 @@ jobs:
579582
580583 - name : generate pgo data
581584 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
586588 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"'
587589
588590 - name : merge pgo data
@@ -608,6 +610,9 @@ jobs:
608610 name : pypi_files_${{ matrix.os }}_${{ matrix.interpreter }}
609611 path : dist
610612
613+ env :
614+ UV_PYTHON : ${{ matrix.interpreter }}
615+
611616 inspect-pypi-assets :
612617 needs : [build, build-sdist, build-pgo]
613618 runs-on : ubuntu-latest
@@ -682,12 +687,11 @@ jobs:
682687 fi
683688 run : |
684689 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__)'
691695
692696 test-builds-os :
693697 name : test build on ${{ matrix.os }}
0 commit comments