Skip to content

Commit 1feb192

Browse files
committed
Support windows too
1 parent a92129c commit 1feb192

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
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: 4 additions & 6 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:
@@ -23,10 +23,8 @@ jobs:
2323

2424
- name: Check dependency-free runtime
2525
run: |
26-
base=$PWD
27-
cd $(mktemp --directory)
28-
echo foo > foo.out
29-
python3 $base/validate-generated-files.py --files foo.out -- bash -c 'echo foo > foo.out'
26+
echo foo > /tmp/foo.out
27+
python3 validate-generated-files.py --files /tmp/foo.out -- $SHELL -c 'echo foo > /tmp/foo.out'
3028
3129
- name: Set up Python
3230
uses: actions/setup-python@v4
@@ -45,4 +43,4 @@ jobs:
4543
run: ./script/typing/check
4644

4745
- name: Test
48-
run: ./run-tests
46+
run: SHELL=$SHELL ./run-tests

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)