50
50
dotnet-version : ' 6.0.x'
51
51
52
52
- name : Install the latest version of uv
53
- uses : astral-sh/setup-uv@v3
53
+ uses : astral-sh/setup-uv@v4
54
54
with :
55
+ architecture : ${{ matrix.os.platform }}
56
+ python-version : ${{ matrix.python }}
55
57
enable-cache : true
56
58
57
59
- name : Install dependencies
@@ -62,40 +64,38 @@ jobs:
62
64
- name : Set Python DLL path and PYTHONHOME (non Windows)
63
65
if : ${{ matrix.os.category != 'windows' }}
64
66
run : |
65
- echo PYTHONNET_PYDLL=$(uv run find_libpython) >> $GITHUB_ENV
66
- echo PYTHONHOME=$(uv run python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
67
+ echo PYTHONNET_PYDLL=$(uv run python -m find_libpython) >> $GITHUB_ENV
67
68
68
69
- name : Set Python DLL path and PYTHONHOME (Windows)
69
70
if : ${{ matrix.os.category == 'windows' }}
70
71
run : |
71
- Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(uv run find_libpython)"
72
- Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(uv run python -c 'import sys; print(sys.prefix)')"
72
+ Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(uv run python -m find_libpython)"
73
73
74
74
- name : Embedding tests
75
- run : dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
75
+ run : uv run dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
76
76
env :
77
77
MONO_THREADS_SUSPEND : preemptive # https://github.com/mono/mono/issues/21466
78
78
79
79
- name : Python Tests (Mono)
80
80
if : ${{ matrix.os.category != 'windows' }}
81
- run : uv run pytest --runtime mono
81
+ run : uv run python -m pytest --runtime mono
82
82
83
83
# TODO: Run these tests on Windows x86
84
84
- name : Python Tests (.NET Core)
85
85
if : ${{ matrix.os.platform == 'x64' }}
86
- run : uv run pytest --runtime coreclr
86
+ run : uv run python -m pytest --runtime coreclr
87
87
88
88
- name : Python Tests (.NET Framework)
89
89
if : ${{ matrix.os.category == 'windows' }}
90
- run : uv run pytest --runtime netfx
90
+ run : uv run python -m pytest --runtime netfx
91
91
92
92
- name : Python tests run from .NET
93
- run : dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
94
-
95
- - name : Perf tests
96
- if : ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
97
- run : |
98
- uv pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
99
- dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
100
-
93
+ run : uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
94
+
95
+ # - name: Perf tests
96
+ # if: ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
97
+ # run: |
98
+ # uv pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
99
+ # uv run dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
100
+ #
101
101
# TODO: Run mono tests on Windows?
0 commit comments