@@ -59,32 +59,23 @@ jobs:
5959 8.0.x
6060 9.0.x
6161
62- - name : Set up Python ${{ matrix.python }}
63- uses : actions /setup-python @v6
62+ - name : Install the latest version of uv
63+ uses : astral-sh /setup-uv @v6
6464 with :
65- python-version : ${{ matrix.python }}
6665 architecture : ${{ matrix.os.platform }}
67-
68- - name : Install dependencies
69- run : |
70- pip install --upgrade -r requirements.txt
71- pip install numpy # for tests
72-
73- - name : Build and Install
74- run : |
75- pip install -v .
66+ python-version : ${{ matrix.python }}
67+ activate-environment : true
68+ enable-cache : true
7669
7770 - name : Set Python DLL path and PYTHONHOME (non Windows)
7871 if : ${{ matrix.os.category != 'windows' }}
7972 run : |
80- echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
81- echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
73+ echo PYTHONNET_PYDLL=$(uv run find_libpython) >> $GITHUB_ENV
8274
8375 - name : Set Python DLL path and PYTHONHOME (Windows)
8476 if : ${{ matrix.os.category == 'windows' }}
8577 run : |
86- Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(python -m find_libpython)"
87- Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"
78+ Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(uv run find_libpython)"
8879
8980 - name : Embedding tests
9081 run : dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
@@ -105,4 +96,15 @@ jobs:
10596 run : pytest --runtime netfx
10697
10798 - name : Python tests run from .NET
99+ <<<<<<< HEAD
108100 run : dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
101+ =======
102+ run : uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
103+
104+ - name : Perf tests
105+ if : ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
106+ run : |
107+ uv pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
108+ uv run dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
109+ # TODO: Run mono tests on Windows?
110+ >>>>>>> uv
0 commit comments