Skip to content

Commit

Permalink
test minimum versions
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Jan 22, 2025
1 parent a5dca23 commit b1db5cb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
pull_request: {}

env:
CI: true
COLUMNS: 150
UV_PYTHON: 3.12
UV_FROZEN: '1'
Expand Down Expand Up @@ -144,6 +143,13 @@ jobs:

- run: uv run --all-extras python tests/import_examples.py

# this must run last as it modifies the environment!
- run: |
unset UV_FROZEN
uv run --resolution lowest-direct coverage run -m pytest
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-resolution-lowest-direct
- name: store coverage files
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion pydantic_ai_slim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ requires-python = ">=3.9"
dependencies = [
"eval-type-backport>=0.2.0",
"griffe>=1.3.2",
"httpx>=0.27.2",
"httpx>=0.27",
"logfire-api>=1.2.0",
"pydantic>=2.10",
]
Expand Down
2 changes: 1 addition & 1 deletion pydantic_graph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
]
requires-python = ">=3.9"
dependencies = [
"httpx>=0.27.2",
"httpx>=0.27",
"logfire-api>=1.2.0",
"pydantic>=2.10",
]
Expand Down
11 changes: 11 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations as _annotations

import asyncio
import os
from collections.abc import AsyncIterator

import httpx
import pydantic
import pytest
from inline_snapshot import snapshot

Expand Down Expand Up @@ -76,3 +79,11 @@ async def test_peekable_async_stream(peek_first: bool):
assert await peekable_async_stream.is_exhausted()
assert await peekable_async_stream.peek() is UNSET
assert items == [1, 2, 3]


def test_package_versions(capsys: pytest.CaptureFixture[str]):
if os.getenv('CI'):
with capsys.disabled():
print('\ndependency versions:')
print('pydantic version:', pydantic.__version__)
print('httpx version:', httpx.__version__)
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b1db5cb

Please sign in to comment.