]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
💚 Fix CI test suite for Windows and MacOS (#1307)
authorSofie Van Landeghem <svlandeg@users.noreply.github.com>
Wed, 17 Sep 2025 22:19:41 +0000 (00:19 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Sep 2025 22:19:41 +0000 (00:19 +0200)
.github/workflows/test.yml
pyproject.toml
tests/test_select_gen.py

index 570941f5b9de73eabeda811ea3e6bf1798ba8113..c4fdb911a8a9c9f49582871cd8809a12f65c25d5 100644 (file)
@@ -25,17 +25,30 @@ jobs:
   test:
     strategy:
       matrix:
-        os: [ ubuntu-latest ]
-        python-version:
-          - "3.8"
-          - "3.9"
-          - "3.10"
-          - "3.11"
-          - "3.12"
-          - "3.13"
+        os: [ ubuntu-latest, windows-latest, macos-latest ]
+        python-version: [ "3.13" ]
         pydantic-version:
           - pydantic-v1
           - pydantic-v2
+        include:
+          - os: macos-latest
+            python-version: "3.8"
+            pydantic-version: pydantic-v1
+          - os: windows-latest
+            python-version: "3.9"
+            pydantic-version: pydantic-v2
+          - os: ubuntu-latest
+            python-version: "3.10"
+            pydantic-version: pydantic-v1
+          - os: macos-latest
+            python-version: "3.11"
+            pydantic-version: pydantic-v2
+          - os: windows-latest
+            python-version: "3.12"
+            pydantic-version: pydantic-v1
+          - os: ubuntu-latest
+            python-version: "3.12"
+            pydantic-version: pydantic-v2
       fail-fast: false
     runs-on: ${{ matrix.os }}
     steps:
@@ -78,7 +91,7 @@ jobs:
       - name: Store coverage files
         uses: actions/upload-artifact@v4
         with:
-          name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
+          name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
           path: coverage
           include-hidden-files: true
 
index 766b0558194f913e1faf49de75329601584b1cd3..4ae195ac7313022a310ebf711cf6349695e0fc2b 100644 (file)
@@ -81,6 +81,7 @@ source = [
 ]
 context = '${CONTEXT}'
 dynamic_context = "test_function"
+relative_files = true
 
 [tool.coverage.report]
 show_missing = true
index e14200d513d16c0d3a5ab07fe14938e19172d2a2..664cebf2a7978d9aa54f24301493816278236851 100644 (file)
@@ -13,7 +13,7 @@ def test_select_gen() -> None:
     env = os.environ.copy()
     env["CHECK_JINJA"] = "1"
     result = subprocess.run(
-        [sys.executable, "scripts/generate_select.py"],
+        [sys.executable, Path("scripts") / "generate_select.py"],
         env=env,
         check=True,
         cwd=root_path,