From b7cc8b9960f02351d9e4a3db6c92afdb9de63ad4 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Sat, 16 Sep 2023 23:49:21 +0100 Subject: [PATCH 1/2] Support windows too --- .gitattributes | 2 ++ .github/workflows/main.yml | 6 +++--- tests.py | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4cab1f4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f2a9a4..e6ca000 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: python-version: ['3.8', '3.9', '3.10', '3.11'] - test-os: [ubuntu-latest] + test-os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.test-os }} defaults: @@ -38,12 +38,12 @@ jobs: run: ./script/typing/check - name: Test - run: ./run-tests + run: SHELL=$SHELL ./run-tests action-check: strategy: matrix: - test-os: [ubuntu-latest] + test-os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.test-os }} defaults: diff --git a/tests.py b/tests.py index f0db43b..4d08700 100755 --- a/tests.py +++ b/tests.py @@ -2,6 +2,7 @@ from __future__ import annotations +import os import sys import shutil import tempfile @@ -42,7 +43,7 @@ def assertProcessSnapshot( '--files', *target_files, '--', - 'bash', + os.environ.get('SHELL', 'bash'), # Cope with windows str(script), ], capture_output=True, From 4e3918626cf4cfc25a4f542d21f19fc90b471242 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Sun, 17 Sep 2023 00:05:52 +0100 Subject: [PATCH 2/2] Debug --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6ca000..bb2d680 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: jobs: run-checks: strategy: + fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11'] test-os: [ubuntu-latest, windows-latest]