Skip to content

Commit 6397b22

Browse files
authored
feat: add windows runner for pytest (#1201)
* feat: run tests on windows and macOS. * resue steps via anchors. * remove macOS job.
1 parent 4d882a7 commit 6397b22

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/pytest.yaml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ name: pytest
44
on: [push, pull_request]
55

66
jobs:
7-
pytest:
8-
name: Run pytest
7+
pytest-linux:
8+
name: Run pytest (Linux)
99
runs-on: ubuntu-24.04
1010

1111
steps:
12-
- name: Checkout repo
12+
- &checkout
13+
name: Checkout repo
1314
uses: actions/checkout@v4
1415

15-
- name: Setup Python
16+
- &setup-python
17+
name: Setup Python
1618
uses: actions/setup-python@v5
1719
with:
1820
python-version: '3.12'
1921
cache: pip
2022

21-
- name: Install Python dependencies
23+
- &install-dependencies
24+
name: Install Python dependencies
2225
run: |
2326
python -m pip install --upgrade uv
2427
uv pip install --system .[pytest]
@@ -52,10 +55,27 @@ jobs:
5255
name: coverage
5356
path: coverage.xml
5457

58+
pytest-windows:
59+
name: Run pytest (Windows)
60+
runs-on: windows-2025
61+
62+
steps:
63+
- *checkout
64+
- *setup-python
65+
- *install-dependencies
66+
67+
- name: Install system dependencies
68+
run: |
69+
choco install ripgrep
70+
71+
- name: Execute pytest
72+
run: |
73+
pytest
74+
5575
coverage:
5676
name: Check coverage
5777
runs-on: ubuntu-latest
58-
needs: pytest
78+
needs: pytest-linux
5979

6080
steps:
6181
- name: Fetch coverage

0 commit comments

Comments
 (0)