Skip to content

Commit b7cc8b9

Browse files
committed
Support windows too
1 parent 8baae4f commit b7cc8b9

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version: ['3.8', '3.9', '3.10', '3.11']
14-
test-os: [ubuntu-latest]
14+
test-os: [ubuntu-latest, windows-latest]
1515

1616
runs-on: ${{ matrix.test-os }}
1717
defaults:
@@ -38,12 +38,12 @@ jobs:
3838
run: ./script/typing/check
3939

4040
- name: Test
41-
run: ./run-tests
41+
run: SHELL=$SHELL ./run-tests
4242

4343
action-check:
4444
strategy:
4545
matrix:
46-
test-os: [ubuntu-latest]
46+
test-os: [ubuntu-latest, windows-latest]
4747

4848
runs-on: ${{ matrix.test-os }}
4949
defaults:

tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import os
56
import sys
67
import shutil
78
import tempfile
@@ -42,7 +43,7 @@ def assertProcessSnapshot(
4243
'--files',
4344
*target_files,
4445
'--',
45-
'bash',
46+
os.environ.get('SHELL', 'bash'), # Cope with windows
4647
str(script),
4748
],
4849
capture_output=True,

0 commit comments

Comments
 (0)