Back to work #757
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| windows: | |
| name: Windows Py${{ matrix.PYTHON_VERSION }} | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| env: | |
| PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | |
| RUNNER_OS: "windows" | |
| PYWINPTY_BLOCK: "1" | |
| CI_RUNNING: "1" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| PYTHON_VERSION: ["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"] | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v6 | |
| - uses: nuget/setup-nuget@v4 | |
| with: | |
| nuget-version: '5.x' | |
| - name: Remove free-threaded suffix from version | |
| env: | |
| PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | |
| shell: bash -l {0} | |
| run: | | |
| PYTHON_VERSION_NONSUFFIX=$PYTHON_VERSION | |
| if [[ $PYTHON_VERSION = *t ]]; then | |
| PYTHON_VERSION_NONSUFFIX=${PYTHON_VERSION//t} | |
| echo "PYTHON_VERSION_NONSUFFIX=$PYTHON_VERSION_NONSUFFIX" >> $GITHUB_ENV | |
| fi | |
| echo "PYTHON_VERSION_NONSUFFIX=$PYTHON_VERSION_NONSUFFIX" >> $GITHUB_ENV | |
| - name: Install miniconda | |
| uses: conda-incubator/setup-miniconda@v4 | |
| with: | |
| auto-update-conda: true | |
| miniforge-version: latest | |
| channels: conda-forge/label/python_rc,conda-forge | |
| conda-remove-defaults: "true" | |
| python-version: ${{ env.PYTHON_VERSION_NONSUFFIX }} | |
| - name: Reinstall free-threaded Python | |
| if: ${{ endsWith(matrix.PYTHON_VERSION, 't') }} | |
| shell: bash -l {0} | |
| run: | | |
| conda install --override-channels -c conda-forge python-freethreading | |
| - name: Conda env info | |
| shell: bash -l {0} | |
| run: conda env list | |
| - name: Install winpty | |
| shell: bash -l {0} | |
| run: conda install -y winpty | |
| - name: Install build/test dependencies | |
| shell: bash -l {0} | |
| run: pip install maturin toml pytest flaky | |
| - name: Build pywinpty | |
| shell: bash -l {0} | |
| run: maturin develop | |
| - name: Run tests | |
| shell: pwsh | |
| run: python runtests.py | |
| # Enable this to get RDP access to the worker. | |
| # - name: Download | |
| # # if: ${{ failure() }} | |
| # run: Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip | |
| # - name: Extract | |
| # # if: ${{ failure() }} | |
| # run: Expand-Archive ngrok.zip | |
| # - name: Auth | |
| # # if: ${{ failure() }} | |
| # run: .\ngrok\ngrok.exe config add-authtoken 1raaG4z7gsaCRlLw8cRkUWW6ItF_2LWTUFxXwd6UeeJNAAAci | |
| # - name: Enable TS | |
| # # if: ${{ failure() }} | |
| # run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 | |
| # - run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
| # # if: ${{ failure() }} | |
| # - run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1 | |
| # # if: ${{ failure() }} | |
| # - run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force) | |
| # # if: ${{ failure() }} | |
| # - name: Create Tunnel | |
| # # if: ${{ failure() }} | |
| # run: .\ngrok\ngrok.exe tcp 3389 |