Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on variety of pydantic versions 🩷 #503

Merged
merged 31 commits into from
Oct 18, 2024
Merged
Changes from 3 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
44aa875
new pydantic matrix
sydney-runkle Oct 15, 2024
d39bfec
more helpful title
sydney-runkle Oct 15, 2024
2c0fe7a
swap order
sydney-runkle Oct 15, 2024
da710ea
update pydantic versions and remove nocover stmts
sydney-runkle Oct 16, 2024
6220c26
add to check
sydney-runkle Oct 16, 2024
cc1a84f
combine, mega matrix
sydney-runkle Oct 16, 2024
219c728
minor patch
sydney-runkle Oct 16, 2024
1ed317d
name update
sydney-runkle Oct 16, 2024
8323589
add tests for other versions on 3.12
sydney-runkle Oct 17, 2024
9fdfb83
Merge branch 'main' into try-pydantic-matrix
sydney-runkle Oct 17, 2024
9fb5364
conditional cleanup
sydney-runkle Oct 17, 2024
92289d9
update main.yml
sydney-runkle Oct 17, 2024
603344d
Merge branch 'try-pydantic-matrix' of https://github.com/pydantic/log…
sydney-runkle Oct 17, 2024
6f84ead
add dashes for clarity
sydney-runkle Oct 17, 2024
659677c
Update .github/workflows/main.yml
alexmojaki Oct 17, 2024
cba079c
Update .github/workflows/main.yml
sydney-runkle Oct 17, 2024
5f0817a
install most recent patch
sydney-runkle Oct 17, 2024
a20bc62
Merge branch 'try-pydantic-matrix' of https://github.com/pydantic/log…
sydney-runkle Oct 17, 2024
48919ea
more intuitive naming
sydney-runkle Oct 17, 2024
bb36361
v1 pragma removal
sydney-runkle Oct 17, 2024
a45b727
run with uv explicit command
sydney-runkle Oct 18, 2024
0fed33f
Merge branch 'main' into try-pydantic-matrix
sydney-runkle Oct 18, 2024
c414705
fix tests for v2.4
sydney-runkle Oct 18, 2024
886c66f
fixing tests?
sydney-runkle Oct 18, 2024
0899693
remove v1 crap
sydney-runkle Oct 18, 2024
83f4813
more stupid pass
sydney-runkle Oct 18, 2024
9492b62
coverage test
sydney-runkle Oct 18, 2024
7f62213
please work
sydney-runkle Oct 18, 2024
e3fb610
alex's request
sydney-runkle Oct 18, 2024
e2f74ef
my final attempt at a fix
sydney-runkle Oct 18, 2024
2e5dc79
Merge branch 'main' into try-pydantic-matrix
alexmojaki Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,49 @@ jobs:
path: coverage
include-hidden-files: true

test-pydantic:
name: test with pydantic ${{ matrix.pydantic-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# keep up to date with 3-4 latest pydantic versions
pydantic-version: ["2.6.4", "2.7.4", "2.8.2", "2.9.2"]
sydney-runkle marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4

- name: Ensure requests to production domains fail
if: runner.os == 'Linux'
run: |
echo "203.0.113.0 logfire.dev" | sudo tee -a /etc/hosts
echo "203.0.113.0 logfire-api.pydantic.dev" | sudo tee -a /etc/hosts
echo "203.0.113.0 logfire.pydantic.dev" | sudo tee -a /etc/hosts

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.12"
enable-cache: true

- name: Set up Python 3.12
run: uv python install 3.12

- run: uv sync --python 3.12 --upgrade

- name: Install pydantic ${{ matrix.pydantic-version }}
run: uv pip install pydantic==${{ matrix.pydantic-version }}

- run: mkdir coverage
- run: make test
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-pydantic-${{ matrix.pydantic-version }}
- name: store coverage files
uses: actions/upload-artifact@v4
with:
name: coverage-pydantic-${{ matrix.pydantic-version }}
path: coverage
include-hidden-files: true

coverage:
runs-on: ubuntu-latest
needs: [test]
Expand Down