File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,14 +135,83 @@ jobs:
135135 mysql-version : ' 9.7'
136136 root-password : root
137137
138- - name : Pytest / behave
138+ - name : Run pytest
139139 env :
140140 PYTEST_PASSWORD : root
141141 PYTEST_HOST : 127.0.0.1
142142 run : |
143143 uv run -- coverage run -m pytest
144144 uv run -- coverage report -m --sort=Miss --skip-covered --skip-empty
145145
146+ tests-wsl :
147+ name : Tests WSL
148+ runs-on : windows-latest
149+
150+ steps :
151+ - uses : vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7.0.0
152+ with :
153+ distribution : Ubuntu-24.04
154+ update : ' true'
155+ additional-packages : |
156+ curl
157+ git
158+ mysql-server
159+ pkg-config
160+ build-essential
161+ python3-pip
162+
163+ - name : Create working directory
164+ shell : wsl-bash {0}
165+ run : |
166+ mkdir -p /root/mycli
167+
168+ - uses : ubuntu/wsl/.github/actions/wsl-checkout@86f464de45987910a3d1aa9d1237ac244a32f811
169+ with :
170+ distro : Ubuntu-24.04
171+ working-dir : /root/mycli
172+
173+ - name : Install uv
174+ shell : wsl-bash {0}
175+ run : |
176+ export PATH="$HOME/.local/bin:$PATH"
177+ env PYTHONPATH=/usr/local/lib/python3.14/site-packages pip install --upgrade --break-system-packages --prefix=/usr uv
178+
179+ - name : Install dependencies
180+ shell : wsl-bash {0}
181+ run : |
182+ export PATH="$HOME/.local/bin:$PATH"
183+ cd /root/mycli
184+ uv sync --all-extras --python 3.14
185+
186+ - name : Start MySQL in WSL
187+ shell : wsl-bash {0}
188+ run : |
189+ sudo service mysql start
190+
191+ - name : Wait for MySQL connection
192+ shell : wsl-bash {0}
193+ run : |
194+ while ! mysqladmin ping --host=localhost --port=3306 --user=root --silent; do
195+ sleep 5
196+ done
197+
198+ - name : Set up MySQL
199+ shell : wsl-bash {0}
200+ run : |
201+ mysqladmin -u root password root
202+
203+ - name : Run pytest
204+ shell : wsl-bash {0}
205+ env :
206+ PYTEST_HOST : 127.0.0.1
207+ PYTEST_USER : root
208+ PYTEST_PASSWORD : root
209+ run : |
210+ export PATH="$HOME/.local/bin:$PATH"
211+ cd /root/mycli
212+ uv run --python 3.14 -- coverage run -m pytest
213+ uv run --python 3.14 -- coverage report -m --sort=Miss --skip-covered --skip-empty
214+
146215 test-no-extras :
147216 name : Tests Without Extras
148217 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 88* Update Python versions used in CI.
99* Add CI on macOS.
1010* Add limited CI on Windows.
11+ * Add limited CI on Windows WSL.
1112
1213
13141.73.1 (2026/05/29)
Original file line number Diff line number Diff line change 33import builtins
44import os
55from pathlib import Path
6+ import platform
67import stat
78import subprocess
89import tempfile
@@ -224,6 +225,7 @@ def test_tee_command():
224225 print (f"An error occurred while attempting to delete the file: { e } " )
225226
226227
228+ @pytest .mark .skipif ('wsl2' in platform .uname ().release .lower (), reason = 'todo: unknown' )
227229def test_tee_command_error ():
228230 with pytest .raises (TypeError ):
229231 mycli .packages .special .execute (None , "tee" )
You can’t perform that action at this time.
0 commit comments