Skip to content

Commit 35c0005

Browse files
authored
💚 Fix CI test suite for Windows and MacOS (#1307)
1 parent 192ba90 commit 35c0005

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,30 @@ jobs:
2525
test:
2626
strategy:
2727
matrix:
28-
os: [ ubuntu-latest ]
29-
python-version:
30-
- "3.8"
31-
- "3.9"
32-
- "3.10"
33-
- "3.11"
34-
- "3.12"
35-
- "3.13"
28+
os: [ ubuntu-latest, windows-latest, macos-latest ]
29+
python-version: [ "3.13" ]
3630
pydantic-version:
3731
- pydantic-v1
3832
- pydantic-v2
33+
include:
34+
- os: macos-latest
35+
python-version: "3.8"
36+
pydantic-version: pydantic-v1
37+
- os: windows-latest
38+
python-version: "3.9"
39+
pydantic-version: pydantic-v2
40+
- os: ubuntu-latest
41+
python-version: "3.10"
42+
pydantic-version: pydantic-v1
43+
- os: macos-latest
44+
python-version: "3.11"
45+
pydantic-version: pydantic-v2
46+
- os: windows-latest
47+
python-version: "3.12"
48+
pydantic-version: pydantic-v1
49+
- os: ubuntu-latest
50+
python-version: "3.12"
51+
pydantic-version: pydantic-v2
3952
fail-fast: false
4053
runs-on: ${{ matrix.os }}
4154
steps:
@@ -78,7 +91,7 @@ jobs:
7891
- name: Store coverage files
7992
uses: actions/upload-artifact@v4
8093
with:
81-
name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
94+
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
8295
path: coverage
8396
include-hidden-files: true
8497

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ source = [
8181
]
8282
context = '${CONTEXT}'
8383
dynamic_context = "test_function"
84+
relative_files = true
8485

8586
[tool.coverage.report]
8687
show_missing = true

tests/test_select_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_select_gen() -> None:
1313
env = os.environ.copy()
1414
env["CHECK_JINJA"] = "1"
1515
result = subprocess.run(
16-
[sys.executable, "scripts/generate_select.py"],
16+
[sys.executable, Path("scripts") / "generate_select.py"],
1717
env=env,
1818
check=True,
1919
cwd=root_path,

0 commit comments

Comments
 (0)