From 5b98e3e5ac8987d052f7d5809b3e5fd5af09e8e6 Mon Sep 17 00:00:00 2001 From: Sola-ris <190788035+Sola-ris@users.noreply.github.com> Date: Wed, 12 Nov 2025 23:02:45 +0100 Subject: [PATCH 1/3] feat: run tests on windows and macOS. --- .github/workflows/pytest.yaml | 60 +++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 2a8bf7e83..6b429aaf5 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -4,8 +4,8 @@ name: pytest on: [push, pull_request] jobs: - pytest: - name: Run pytest + pytest-linux: + name: Run pytest (Linux) runs-on: ubuntu-24.04 steps: @@ -52,10 +52,64 @@ jobs: name: coverage path: coverage.xml + pytest-windows: + name: Run pytest (Windows) + runs-on: windows-2025 + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + + - name: Install Python dependencies + run: | + python -m pip install --upgrade uv + uv pip install --system .[pytest] + + - name: Install system dependencies + run: | + choco install ripgrep + + - name: Execute pytest + run: | + pytest + + pytest-macos: + name: Run pytest (macOS) + runs-on: macos-15 + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + + - name: Install Python dependencies + run: | + python -m pip install --upgrade uv + uv pip install --system .[pytest] + + - name: Install system dependencies + run: | + brew install ripgrep + + - name: Execute pytest + run: | + pytest + coverage: name: Check coverage runs-on: ubuntu-latest - needs: pytest + needs: pytest-linux steps: - name: Fetch coverage From 2c5a62d65de428deebd6817c418850cdff105572 Mon Sep 17 00:00:00 2001 From: Sola-ris <190788035+Sola-ris@users.noreply.github.com> Date: Thu, 13 Nov 2025 19:48:24 +0100 Subject: [PATCH 2/3] resue steps via anchors. --- .github/workflows/pytest.yaml | 48 +++++++++++------------------------ 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 6b429aaf5..ad6f9d630 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -9,16 +9,19 @@ jobs: runs-on: ubuntu-24.04 steps: - - name: Checkout repo + - &checkout + name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python + - &setup-python + name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.12' cache: pip - - name: Install Python dependencies + - &install-dependencies + name: Install Python dependencies run: | python -m pip install --upgrade uv uv pip install --system .[pytest] @@ -57,25 +60,16 @@ jobs: runs-on: windows-2025 steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - cache: pip - - - name: Install Python dependencies - run: | - python -m pip install --upgrade uv - uv pip install --system .[pytest] + - *checkout + - *setup-python + - *install-dependencies - name: Install system dependencies run: | choco install ripgrep - - name: Execute pytest + - &pytest + name: Execute pytest run: | pytest @@ -84,27 +78,15 @@ jobs: runs-on: macos-15 steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - cache: pip - - - name: Install Python dependencies - run: | - python -m pip install --upgrade uv - uv pip install --system .[pytest] + - *checkout + - *setup-python + - *install-dependencies - name: Install system dependencies run: | brew install ripgrep - - name: Execute pytest - run: | - pytest + - *pytest coverage: name: Check coverage From 5168a16a106db653e71bc6b0a0d070fb9649b00c Mon Sep 17 00:00:00 2001 From: Sola-ris <190788035+Sola-ris@users.noreply.github.com> Date: Mon, 17 Nov 2025 19:58:43 +0100 Subject: [PATCH 3/3] remove macOS job. --- .github/workflows/pytest.yaml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index ad6f9d630..78b730074 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -68,26 +68,10 @@ jobs: run: | choco install ripgrep - - &pytest - name: Execute pytest + - name: Execute pytest run: | pytest - pytest-macos: - name: Run pytest (macOS) - runs-on: macos-15 - - steps: - - *checkout - - *setup-python - - *install-dependencies - - - name: Install system dependencies - run: | - brew install ripgrep - - - *pytest - coverage: name: Check coverage runs-on: ubuntu-latest