-
Notifications
You must be signed in to change notification settings - Fork 79
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
Daily CI with unpinned deps #583
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Daily CI Job | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * *' # Daily at midnight UTC | ||
|
||
# Can be triggered manually from the actions tab, if needed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: test on Python ${{ matrix.python-version }} and pydantic ${{ matrix.pydantic-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
pydantic-version: ['main'] | ||
include: | ||
- python-version: '3.12' | ||
pydantic-version: '2.4' | ||
- python-version: '3.12' | ||
pydantic-version: '2.5' | ||
- python-version: '3.12' | ||
pydantic-version: '2.6' | ||
- python-version: '3.12' | ||
pydantic-version: '2.7' | ||
- python-version: '3.12' | ||
pydantic-version: '2.8' | ||
- python-version: '3.12' | ||
pydantic-version: '2.9' | ||
env: | ||
PYTHON: ${{ matrix.python-version }} | ||
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.30" | ||
enable-cache: true | ||
|
||
# upgrade deps to the latest versions for this daily test | ||
- run: uv sync --python ${{ matrix.python-version }} --upgrade | ||
|
||
- name: Install pydantic ${{ matrix.pydantic-version }} | ||
if: matrix.pydantic-version != 'main' | ||
# installs the most recent patch on the minor version's track, ex 2.6.0 -> 2.6.4 | ||
run: uv pip install 'pydantic==${{ matrix.pydantic-version }}.*' | ||
|
||
- run: uv run --no-sync pytest | ||
|
||
- name: Notify on failure | ||
if: failure() | ||
run: echo "Tests failed. TODO - send notification..." |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we do this only with Pydantic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will want a matrix for other deps too but it doesn't need to be a first step. We're still using the latest version of everything.
I also think that having this full matrix here means that regular CI only needs 2.4 and the latest release (pinned) and anything else needed for coverage (eventually v1 when some form of that works) so that it can run quickly and cheaply. Not a blocker though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexmojaki,
Wouldn't it make sense to just test
2.4
andmain
on the daily CI, and leave all of these for the PR tests?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the daily CI is a good place to put things that take longer that we don't want to wait for to merge a PR.