@@ -10,18 +10,19 @@ permissions:
10
10
11
11
jobs :
12
12
build :
13
- runs-on : ubuntu-latest
14
-
15
13
strategy :
16
14
fail-fast : false
17
15
matrix :
16
+ os : ["ubuntu-latest", "windows-latest"]
18
17
python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
19
18
include :
20
19
- experimental : false
21
20
21
+ runs-on : ${{ matrix.os }}
22
+
22
23
defaults :
23
24
run :
24
- shell : /bin/ bash --noprofile --norc -exo pipefail {0}
25
+ shell : bash --noprofile --norc -exo pipefail {0}
25
26
26
27
steps :
27
28
- uses : actions/checkout@v4
34
35
python-version : ${{ matrix.python-version }}
35
36
allow-prereleases : ${{ matrix.experimental }}
36
37
38
+ - name : Set up WSL (Windows)
39
+ if : startsWith(matrix.os, 'windows')
40
+
41
+ with :
42
+ distribution : Debian
43
+
37
44
- name : Prepare this repo for tests
38
45
run : |
39
46
./init-tests-after-clone.sh
61
68
command -v git python
62
69
git version
63
70
python --version
64
- python -c 'import sys; print(sys.platform)'
65
- python -c 'import os; print(os.name)'
66
- 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}")'
72
+
73
+ # For debugging hook tests on native Windows systems that may have WSL.
74
+ - name : Show bash.exe candidates (Windows)
75
+ if : startsWith(matrix.os, 'windows')
76
+ run : |
77
+ set +e
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"])'
80
+ continue-on-error : true
67
81
68
82
- name : Check types with mypy
69
83
run : |
0 commit comments