@@ -49,26 +49,21 @@ jobs:
4949 with :
5050 dotnet-version : ' 6.0.x'
5151
52- - name : Set up Python ${{ matrix.python }}
53- uses : actions /setup-python@v2
52+ - name : Install the latest version of uv
53+ uses : astral-sh /setup-uv@v3
5454 with :
55- python-version : ${{ matrix.python }}
56- architecture : ${{ matrix.os.platform }}
55+ enable-cache : true
5756
5857 - name : Install dependencies
5958 run : |
60- pip install --upgrade -r requirements.txt
61- pip install numpy # for tests
62-
63- - name : Build and Install
64- run : |
65- pip install -v .
59+ uv venv --python ${{ matrix.python }}
60+ uv sync
6661
6762 - name : Set Python DLL path and PYTHONHOME (non Windows)
6863 if : ${{ matrix.os.category != 'windows' }}
6964 run : |
70- echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
71- echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
65+ echo PYTHONNET_PYDLL=$(uv run find_libpython) >> $GITHUB_ENV
66+ echo PYTHONHOME=$(uv run python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
7267
7368 - name : Set Python DLL path and PYTHONHOME (Windows)
7469 if : ${{ matrix.os.category == 'windows' }}
@@ -83,24 +78,24 @@ jobs:
8378
8479 - name : Python Tests (Mono)
8580 if : ${{ matrix.os.category != 'windows' }}
86- run : pytest --runtime mono
81+ run : uv run pytest --runtime mono
8782
8883 # TODO: Run these tests on Windows x86
8984 - name : Python Tests (.NET Core)
9085 if : ${{ matrix.os.platform == 'x64' }}
91- run : pytest --runtime coreclr
86+ run : uv run pytest --runtime coreclr
9287
9388 - name : Python Tests (.NET Framework)
9489 if : ${{ matrix.os.category == 'windows' }}
95- run : pytest --runtime netfx
90+ run : uv run pytest --runtime netfx
9691
9792 - name : Python tests run from .NET
9893 run : dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
9994
10095 - name : Perf tests
10196 if : ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
10297 run : |
103- pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
98+ uv pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
10499 dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
105100
106101 # TODO: Run mono tests on Windows?
0 commit comments