mirror of https://github.com/tiangolo/fastapi.git
✅ Expand test matrix to include Windows and MacOS (#14171)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
009c8af7fe
commit
a7ba9932ba
|
|
@ -44,22 +44,44 @@ jobs:
|
||||||
run: bash scripts/lint.sh
|
run: bash scripts/lint.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version:
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
- "3.14"
|
python-version: [ "3.14" ]
|
||||||
- "3.13"
|
pydantic-version: [ "pydantic-v2" ]
|
||||||
- "3.12"
|
coverage: ["coverage"]
|
||||||
- "3.11"
|
include:
|
||||||
- "3.10"
|
- os: macos-latest
|
||||||
- "3.9"
|
python-version: "3.8"
|
||||||
- "3.8"
|
|
||||||
pydantic-version: ["pydantic-v1", "pydantic-v2"]
|
|
||||||
exclude:
|
|
||||||
- python-version: "3.14"
|
|
||||||
pydantic-version: "pydantic-v1"
|
pydantic-version: "pydantic-v1"
|
||||||
|
coverage: coverage
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: "3.8"
|
||||||
|
pydantic-version: "pydantic-v2"
|
||||||
|
coverage: coverage
|
||||||
|
- os: ubuntu-latest
|
||||||
|
python-version: "3.9"
|
||||||
|
pydantic-version: "pydantic-v1"
|
||||||
|
coverage: coverage
|
||||||
|
- os: macos-latest
|
||||||
|
python-version: "3.10"
|
||||||
|
pydantic-version: "pydantic-v2"
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: "3.11"
|
||||||
|
pydantic-version: "pydantic-v1"
|
||||||
|
- os: ubuntu-latest
|
||||||
|
python-version: "3.12"
|
||||||
|
pydantic-version: "pydantic-v2"
|
||||||
|
- os: macos-latest
|
||||||
|
python-version: "3.13"
|
||||||
|
pydantic-version: "pydantic-v1"
|
||||||
|
coverage: coverage
|
||||||
|
- os: windows-latest
|
||||||
|
python-version: "3.13"
|
||||||
|
pydantic-version: "pydantic-v2"
|
||||||
|
coverage: coverage
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
|
|
@ -96,10 +118,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
|
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
|
||||||
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
|
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
|
||||||
|
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
|
||||||
- name: Store coverage files
|
- name: Store coverage files
|
||||||
|
if: matrix.coverage == 'coverage'
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,7 @@ source = [
|
||||||
"tests",
|
"tests",
|
||||||
"fastapi"
|
"fastapi"
|
||||||
]
|
]
|
||||||
|
relative_files = true
|
||||||
context = '${CONTEXT}'
|
context = '${CONTEXT}'
|
||||||
dynamic_context = "test_function"
|
dynamic_context = "test_function"
|
||||||
omit = [
|
omit = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue