Skip to content

Commit

Permalink
Put back WSL on Windows CI; pare down debug info
Browse files Browse the repository at this point in the history
This undoes "Temporarily don't install WSL system to test xfail"
(dabd2fb). It keeps Debian as the distribution. (Although the Debian
WSL system installs pretty fast already, it may still make sense to
try switching to Alpine in the future. But that might need to wait
until Vampire/setup-wsl#50 is fixed.)

This also removes most of the commands in the WSL debugging step,
since the related machinery in test_index.py (_WinBashStatus) seems
to be in okay shape, condenses the smaller number of commands that
are retained there, and makes much less extensive reduction in the
general version and platform information commands as well. This is
to make workflow output easier to read, understand, and navigate.
  • Loading branch information
EliahKagan committed Nov 24, 2023
1 parent dabd2fb commit 237e913
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ jobs:
command -v git python
git version
python --version
python -c 'import sys; print(sys.platform)'
python -c 'import os; print(os.name)'
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
- name: Test with pytest
run: |
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ matrix.experimental }}

- name: Set up WSL (Windows only)
if: startsWith(matrix.os, 'windows')
uses: Vampire/[email protected]
with:
distribution: Debian

- name: Prepare this repo for tests
run: |
./init-tests-after-clone.sh
Expand Down Expand Up @@ -62,29 +68,15 @@ jobs:
command -v git python
git version
python --version
python -c 'import sys; print(sys.platform)'
python -c 'import os; print(os.name)'
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
# For debugging hook tests on native Windows systems that may have WSL.
- name: Show where bash.exe may be found
- name: Show where bash.exe may be found (Windows only)
if: startsWith(matrix.os, 'windows')
run: |
set +e
type -a bash.exe
python -c 'import shutil; print(shutil.which("bash.exe"))'
bash.exe --version
python -c 'import subprocess; p = subprocess.run(["bash.exe", "--version"]); print(f"result: {p!r}")'
bash.exe -c 'echo "$BASH"'
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH" """]); print(f"result: {p!r}")'
bash.exe -c 'echo "$BASH_VERSION"'
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH_VERSION" """]); print(f"result: {p!r}")'
bash.exe -c 'printenv WSL_DISTRO_NAME'
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME"]); print(f"result: {p!r}")'
bash.exe -c 'ls -l /proc/sys/fs/binfmt_misc/WSLInterop'
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "ls -l /proc/sys/fs/binfmt_misc/WSLInterop"]); print(f"result: {p!r}")'
bash.exe -c 'uname -a'
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "uname -a"]); print(f"result: {p!r}")'
bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a'
python -c 'import subprocess; subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME; uname -a"]))'
continue-on-error: true

- name: Check types with mypy
Expand Down

0 comments on commit 237e913

Please sign in to comment.