mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-10-27 11:24:47 +08:00
💚 Fix CI test suite for Windows and MacOS (#1307)
This commit is contained in:
committed by
GitHub
parent
192ba90b1e
commit
35c0005f44
31
.github/workflows/test.yml
vendored
31
.github/workflows/test.yml
vendored
@ -25,17 +25,30 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
python-version:
|
python-version: [ "3.13" ]
|
||||||
- "3.8"
|
|
||||||
- "3.9"
|
|
||||||
- "3.10"
|
|
||||||
- "3.11"
|
|
||||||
- "3.12"
|
|
||||||
- "3.13"
|
|
||||||
pydantic-version:
|
pydantic-version:
|
||||||
- pydantic-v1
|
- pydantic-v1
|
||||||
- pydantic-v2
|
- 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
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
@ -78,7 +91,7 @@ jobs:
|
|||||||
- name: Store coverage files
|
- name: Store coverage files
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
|
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }}
|
||||||
path: coverage
|
path: coverage
|
||||||
include-hidden-files: true
|
include-hidden-files: true
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,7 @@ source = [
|
|||||||
]
|
]
|
||||||
context = '${CONTEXT}'
|
context = '${CONTEXT}'
|
||||||
dynamic_context = "test_function"
|
dynamic_context = "test_function"
|
||||||
|
relative_files = true
|
||||||
|
|
||||||
[tool.coverage.report]
|
[tool.coverage.report]
|
||||||
show_missing = true
|
show_missing = true
|
||||||
|
|||||||
@ -13,7 +13,7 @@ def test_select_gen() -> None:
|
|||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["CHECK_JINJA"] = "1"
|
env["CHECK_JINJA"] = "1"
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
[sys.executable, "scripts/generate_select.py"],
|
[sys.executable, Path("scripts") / "generate_select.py"],
|
||||||
env=env,
|
env=env,
|
||||||
check=True,
|
check=True,
|
||||||
cwd=root_path,
|
cwd=root_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user