Skip to content

Commit 4a1068d

Browse files
committed
Experimental CI entry to run tests with latest dependencies (#920)
* Experimental CI entry to run tests with latest dependencies * Fix upgrade command * Further discriminate log names * Remove locked from matrix * Fixing problem with updated openai dependency * Lint * Move latest deps test to separate job * Fix openai test break * Pydantic validation fails anyway, so remove type ingore * CI cleanup
1 parent 0739382 commit 4a1068d

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,41 @@ jobs:
134134
run: |
135135
npx doctoc README.md
136136
[[ -z $(git status --porcelain README.md) ]] || (git diff README.md; echo "README changed"; exit 1)
137+
test-latest-deps:
138+
timeout-minutes: 30
139+
runs-on: ubuntu-latest
140+
steps:
141+
- uses: actions/checkout@v4
142+
with:
143+
submodules: recursive
144+
- uses: dtolnay/rust-toolchain@stable
145+
- uses: Swatinem/rust-cache@v2
146+
with:
147+
workspaces: temporalio/bridge -> target
148+
- uses: actions/setup-python@v5
149+
with:
150+
python-version: "3.13"
151+
- uses: arduino/setup-protoc@v3
152+
with:
153+
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed
154+
version: "23.x"
155+
repo-token: ${{ secrets.GITHUB_TOKEN }}
156+
- uses: astral-sh/setup-uv@v5
157+
- run: uv tool install poethepoet
158+
- run: uv lock --upgrade
159+
- run: uv sync --all-extras
160+
- run: poe lint
161+
- run: poe build-develop
162+
- run: mkdir junit-xml
163+
- run: poe test -s --junit-xml=junit-xml/latest-deps.xml
164+
timeout-minutes: 10
165+
- name: "Upload junit-xml artifacts"
166+
uses: actions/upload-artifact@v4
167+
if: always()
168+
with:
169+
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--latest-deps--time-skipping
170+
path: junit-xml
171+
retention-days: 14
137172

138173
# Runs the sdk features repo tests with this repo's current SDK code
139174
features-tests:

tests/contrib/openai_agents/test_openai.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import uuid
33
from dataclasses import dataclass
44
from datetime import timedelta
5-
from typing import Any, Optional, Union
5+
from typing import Any, Optional, Union, no_type_check
66

77
import pytest
88

@@ -60,6 +60,7 @@
6060
ResponseOutputMessage,
6161
ResponseOutputText,
6262
)
63+
from openai.types.responses.response_function_web_search import ActionSearch
6364
from openai.types.responses.response_prompt_param import ResponsePromptParam
6465

6566
from tests.contrib.openai_agents.research_agents.research_manager import (
@@ -397,6 +398,7 @@ async def get_response(
397398
)
398399

399400

401+
@no_type_check
400402
class TestResearchModel(TestModel):
401403
responses = [
402404
ModelResponse(
@@ -424,7 +426,10 @@ class TestResearchModel(TestModel):
424426
ModelResponse(
425427
output=[
426428
ResponseFunctionWebSearch(
427-
id="", status="completed", type="web_search_call"
429+
id="",
430+
status="completed",
431+
type="web_search_call",
432+
action=ActionSearch(query="", type="search"),
428433
),
429434
ResponseOutputMessage(
430435
id="",

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)