Visitar URL original
Use uv by filmor · Pull Request #2520 · pythonnet/pythonnet · GitHub
Skip to content
Closed

Use uv #2520

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
venv should be active, use installed exec
  • Loading branch information
filmor committed Apr 14, 2025
commit 6c956e81bb7836cb7e6edd79035e859713da8ade
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,37 +67,37 @@ jobs:
- name: Set Python DLL path and PYTHONHOME (non Windows)
if: ${{ matrix.os.category != 'windows' }}
run: |
echo PYTHONNET_PYDLL=$(uv run python -m find_libpython) >> $GITHUB_ENV
echo PYTHONNET_PYDLL=$(find_libpython) >> $GITHUB_ENV

- name: Set Python DLL path and PYTHONHOME (Windows)
if: ${{ matrix.os.category == 'windows' }}
run: |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(uv run python -m find_libpython)"
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(find_libpython)"

- name: Embedding tests
run: uv run dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466

- name: Python Tests (Mono)
if: ${{ matrix.os.category != 'windows' }}
run: uv run python -m pytest --runtime mono
run: pytest --runtime mono

# TODO: Run these tests on Windows x86
- name: Python Tests (.NET Core)
if: ${{ matrix.os.platform == 'x64' }}
run: uv run python -m pytest --runtime coreclr
run: pytest --runtime coreclr

- name: Python Tests (.NET Framework)
if: ${{ matrix.os.category == 'windows' }}
run: uv run python -m pytest --runtime netfx
run: pytest --runtime netfx

- name: Python tests run from .NET
run: uv run dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/

- name: Perf tests
if: ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
run: |
uv pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
uv run dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
# TODO: Run mono tests on Windows?