File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ name : WSL Python Simple Script Test
2+
3+ on : [push, pull_request]
4+ jobs :
5+ wsl-python-test :
6+ runs-on : windows-2022
7+ steps :
8+ - name : Checkout repository
9+ uses : actions/checkout@v4
10+
11+ - name : Set up test Python script
12+ run : |
13+ echo "print('Hello from WSL Python!')" > test_script.py
14+
15+ - name : Run simple Python script in WSL
16+ shell : pwsh
17+ run : |
18+ wsl --set-default-version 2
19+ # Ensure Python is installed; most WSL distros have it, or install if missing
20+ wsl python3 --version || wsl sudo apt-get update && wsl sudo apt-get install -y python3
21+ # Run the script
22+ wsl python3 test_script.py
23+
24+ - name : Check for hang and exit
25+ run : echo "WSL Python script finished successfully."
You can’t perform that action at this time.
0 commit comments