mirror of https://github.com/astral-sh/uv
Add WSL testing for pyenv-win (#15317)
Adds test coverage for https://github.com/astral-sh/uv/pull/15315 I reproduced the error there, then rebased on #15315 which resolves the issue.
This commit is contained in:
parent
a4d14710d4
commit
ceacd27edb
|
|
@ -1629,6 +1629,58 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
.venv/bin/python -c "import sys; exit(1) if sys._is_gil_enabled() else exit(0)"
|
.venv/bin/python -c "import sys; exit(1) if sys._is_gil_enabled() else exit(0)"
|
||||||
|
|
||||||
|
integration-test-wsl:
|
||||||
|
timeout-minutes: 15
|
||||||
|
needs: build-binary-linux-musl
|
||||||
|
name: "integration test | pyenv on wsl x86-64"
|
||||||
|
runs-on: windows-latest
|
||||||
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event.pull_request.head.repo.fork != true }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: "Download binary"
|
||||||
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: uv-linux-musl-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: "Setup WSL"
|
||||||
|
uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6
|
||||||
|
with:
|
||||||
|
distribution: Ubuntu-22.04
|
||||||
|
|
||||||
|
- name: "Install pyenv-win"
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Write-Host "Installing pyenv-win..."
|
||||||
|
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"
|
||||||
|
.\install-pyenv-win.ps1
|
||||||
|
|
||||||
|
# Add pyenv-win to PATH for this session
|
||||||
|
$env:PYENV = "$env:USERPROFILE\.pyenv\pyenv-win"
|
||||||
|
$env:PATH = "$env:PYENV\bin;$env:PYENV\shims;$env:PATH"
|
||||||
|
|
||||||
|
# Add to GITHUB_PATH so WSL can find the shims
|
||||||
|
echo "$env:PYENV\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
||||||
|
echo "$env:PYENV\shims" | Out-File -FilePath $env:GITHUB_PATH -Append
|
||||||
|
|
||||||
|
Write-Host "Installing Python 3.11.9 via pyenv-win..."
|
||||||
|
& "$env:PYENV\bin\pyenv.bat" install 3.11.9
|
||||||
|
& "$env:PYENV\bin\pyenv.bat" global 3.11.9
|
||||||
|
|
||||||
|
Write-Host "Verifying pyenv-win installation..."
|
||||||
|
& "$env:PYENV\bin\pyenv.bat" versions
|
||||||
|
|
||||||
|
- name: "Test uv"
|
||||||
|
shell: wsl-bash {0}
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
chmod +x ./uv
|
||||||
|
|
||||||
|
# Check that we don't fail on `pyenv-win` shims
|
||||||
|
./uv python list -v
|
||||||
|
|
||||||
integration-test-publish-changed:
|
integration-test-publish-changed:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
needs: build-binary-linux-libc
|
needs: build-binary-linux-libc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue