| 1 |
--- |
| 2 |
name: Test against downstream projects |
| 3 |
|
| 4 |
on: |
| 5 |
workflow_dispatch: |
| 6 |
|
| 7 |
jobs: |
| 8 |
starlette: |
| 9 |
name: "Starlette on Python ${{ matrix.python-version }}" |
| 10 |
runs-on: ubuntu-latest |
| 11 |
strategy: |
| 12 |
fail-fast: false |
| 13 |
matrix: |
| 14 |
python-version: ["3.9", "3.13"] |
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v6 |
| 17 |
with: |
| 18 |
repository: Kludex/starlette |
| 19 |
- uses: astral-sh/setup-uv@v7 |
| 20 |
with: |
| 21 |
python-version: ${{ matrix.python-version }} |
| 22 |
enable-cache: true |
| 23 |
- name: Install dependencies |
| 24 |
run: | |
| 25 |
scripts/install |
| 26 |
pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }} |
| 27 |
- name: Run tests |
| 28 |
run: scripts/test |
| 29 |
- name: Enforce coverage |
| 30 |
run: scripts/coverage |
| 31 |
|
| 32 |
httpcore: |
| 33 |
name: "Httpcore on Python ${{ matrix.python-version }}" |
| 34 |
runs-on: ubuntu-latest |
| 35 |
strategy: |
| 36 |
fail-fast: false |
| 37 |
matrix: |
| 38 |
python-version: ["3.9", "3.13"] |
| 39 |
steps: |
| 40 |
- uses: actions/checkout@v6 |
| 41 |
with: |
| 42 |
repository: encode/httpcore |
| 43 |
- name: Install uv |
| 44 |
uses: actions/setup-python@v6 |
| 45 |
with: |
| 46 |
python-version: "${{ matrix.python-version }}" |
| 47 |
- name: Install dependencies |
| 48 |
run: | |
| 49 |
scripts/install |
| 50 |
pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }} |
| 51 |
- name: Run tests |
| 52 |
run: scripts/test |
| 53 |
- name: Enforce coverage |
| 54 |
run: scripts/coverage |
| 55 |
|
| 56 |
fastapi: |
| 57 |
name: "FastAPI on Python ${{ matrix.python-version }}" |
| 58 |
runs-on: ubuntu-latest |
| 59 |
strategy: |
| 60 |
fail-fast: false |
| 61 |
matrix: |
| 62 |
python-version: ["3.9", "3.13"] |
| 63 |
env: |
| 64 |
UV_SYSTEM_PYTHON: 1 |
| 65 |
steps: |
| 66 |
- uses: actions/checkout@v6 |
| 67 |
with: |
| 68 |
repository: tiangolo/fastapi |
| 69 |
- uses: actions/setup-python@v6 |
| 70 |
with: |
| 71 |
python-version: "${{ matrix.python-version }}" |
| 72 |
- name: Setup uv |
| 73 |
uses: astral-sh/setup-uv@v7 |
| 74 |
with: |
| 75 |
version: "0.4.15" |
| 76 |
enable-cache: true |
| 77 |
cache-dependency-glob: | |
| 78 |
requirements**.txt |
| 79 |
pyproject.toml |
| 80 |
- name: Install dependencies |
| 81 |
run: | |
| 82 |
uv pip install -r requirements-tests.txt |
| 83 |
uv pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }} |
| 84 |
- name: Run tests |
| 85 |
run: pytest -W ignore::ResourceWarning |
| 86 |
env: |
| 87 |
PYTHONPATH: ./docs_src |
| 88 |
|
| 89 |
litestar: |
| 90 |
name: "Litestar on Python ${{ matrix.python-version }}" |
| 91 |
runs-on: ubuntu-latest |
| 92 |
strategy: |
| 93 |
fail-fast: false |
| 94 |
matrix: |
| 95 |
python-version: ["3.9", "3.13"] |
| 96 |
steps: |
| 97 |
- uses: actions/checkout@v6 |
| 98 |
with: |
| 99 |
repository: litestar-org/litestar |
| 100 |
- name: Set up python ${{ matrix.python-version }} |
| 101 |
uses: actions/setup-python@v6 |
| 102 |
with: |
| 103 |
python-version: ${{ matrix.python-version }} |
| 104 |
- name: Install uv |
| 105 |
uses: astral-sh/setup-uv@v7 |
| 106 |
with: |
| 107 |
version: "0.8.8" |
| 108 |
enable-cache: true |
| 109 |
- name: Install dependencies |
| 110 |
run: | |
| 111 |
uv sync |
| 112 |
uv pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }} |
| 113 |
- name: Test |
| 114 |
run: uv run pytest docs/examples tests -n auto |
| 115 |
|
| 116 |
mcp: |
| 117 |
name: "Anthropic MCP on Python ${{ matrix.python-version }}" |
| 118 |
runs-on: ubuntu-latest |
| 119 |
strategy: |
| 120 |
fail-fast: false |
| 121 |
matrix: |
| 122 |
python-version: ["3.10", "3.13"] |
| 123 |
dep-resolution: ["lowest-direct", "highest"] |
| 124 |
steps: |
| 125 |
- uses: actions/checkout@v6 |
| 126 |
with: |
| 127 |
repository: modelcontextprotocol/python-sdk |
| 128 |
- name: Install uv |
| 129 |
uses: astral-sh/setup-uv@v7 |
| 130 |
with: |
| 131 |
enable-cache: true |
| 132 |
version: "0.7.2" |
| 133 |
- name: Install the project |
| 134 |
run: | |
| 135 |
uv sync --frozen --all-extras --python ${{ matrix.python-version }} --resolution ${{ matrix.dep-resolution }} |
| 136 |
uv pip install anyio[trio]@git+https://github.com/agronholm/anyio.git@${{ github.ref_name }} |
| 137 |
- name: Run pytest |
| 138 |
run: uv run --frozen --no-sync pytest |