Skip to content

Commit 2875ffa

Browse files
committed
Put back WSL on Windows CI; pare down debug info
This undoes "Temporarily don't install WSL system to test xfail" (cabb572). 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.
1 parent cabb572 commit 2875ffa

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

.github/workflows/cygwin-test.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ jobs:
7070
command -v git python
7171
git version
7272
python --version
73-
python -c 'import sys; print(sys.platform)'
74-
python -c 'import os; print(os.name)'
75-
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
73+
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
7674
7775
- name: Test with pytest
7876
run: |

.github/workflows/pythonpackage.yml

+10-18
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
python-version: ${{ matrix.python-version }}
3636
allow-prereleases: ${{ matrix.experimental }}
3737

38+
- name: Set up WSL (Windows)
39+
if: startsWith(matrix.os, 'windows')
40+
uses: Vampire/setup-wsl@v2.0.2
41+
with:
42+
distribution: Debian
43+
3844
- name: Prepare this repo for tests
3945
run: |
4046
./init-tests-after-clone.sh
@@ -62,29 +68,15 @@ jobs:
6268
command -v git python
6369
git version
6470
python --version
65-
python -c 'import sys; print(sys.platform)'
66-
python -c 'import os; print(os.name)'
67-
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly.
71+
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
6872
6973
# For debugging hook tests on native Windows systems that may have WSL.
70-
- name: Show where bash.exe may be found
74+
- name: Show bash.exe candidates (Windows)
7175
if: startsWith(matrix.os, 'windows')
7276
run: |
7377
set +e
74-
type -a bash.exe
75-
python -c 'import shutil; print(shutil.which("bash.exe"))'
76-
bash.exe --version
77-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "--version"]); print(f"result: {p!r}")'
78-
bash.exe -c 'echo "$BASH"'
79-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH" """]); print(f"result: {p!r}")'
80-
bash.exe -c 'echo "$BASH_VERSION"'
81-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", """echo "$BASH_VERSION" """]); print(f"result: {p!r}")'
82-
bash.exe -c 'printenv WSL_DISTRO_NAME'
83-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME"]); print(f"result: {p!r}")'
84-
bash.exe -c 'ls -l /proc/sys/fs/binfmt_misc/WSLInterop'
85-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "ls -l /proc/sys/fs/binfmt_misc/WSLInterop"]); print(f"result: {p!r}")'
86-
bash.exe -c 'uname -a'
87-
python -c 'import subprocess; p = subprocess.run(["bash.exe", "-c", "uname -a"]); print(f"result: {p!r}")'
78+
bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a'
79+
python -c 'import subprocess; subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME; uname -a"])'
8880
continue-on-error: true
8981

9082
- name: Check types with mypy

0 commit comments

Comments
 (0)