File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed
Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6+ - guillaume/fix-examples-ga
67 schedule :
78 # Every night at midnight
89 - cron : " 0 0 * * *"
2728 run : poetry install --all-extras
2829
2930 - name : Run all example scripts
30- run : |
31- # Find all Python files in examples directory
32- find examples -name "*.py" -type f | while read -r script; do
33- echo "Running example: $script"
34- poetry run python "$script"
35- if [ $? -ne 0 ]; then
36- echo "Error: Failed to run $script"
37- exit 1
38- fi
39- done
31+ run : make test.examples
4032 env :
4133 WORKFLOWAI_API_KEY : ${{ secrets.WORKFLOWAI_TEST_API_KEY }}
4234
Original file line number Diff line number Diff line change 3131.PHONY : lock
3232lock :
3333 poetry lock --no-update
34+
35+ test.examples :
36+ pytest examples -n=5
Original file line number Diff line number Diff line change 2020
2121import asyncio
2222
23+ import pytest
2324from pydantic import BaseModel , Field
2425
2526import workflowai
@@ -131,6 +132,7 @@ async def combine_responses(responses_input: CombinerInput) -> CombinedOutput:
131132 ...
132133
133134
135+ @pytest .mark .xfail (reason = "Example is flaky" )
134136async def main ():
135137 # Example: Scientific explanation
136138 print ("\n Example: Scientific Concept" )
Original file line number Diff line number Diff line change 1717import asyncio
1818from typing import Optional
1919
20+ import pytest
2021from pydantic import BaseModel , Field
2122
2223import workflowai
@@ -118,7 +119,7 @@ async def delegate_task(agent_input: DelegateInput) -> DelegateOutput:
118119
119120@workflowai .agent (
120121 id = "orchestrator" ,
121- model = Model .GPT_4O_LATEST ,
122+ model = Model .GEMINI_2_0_FLASH_LATEST ,
122123 tools = [delegate_task ],
123124)
124125async def orchestrator_agent (agent_input : OrchestratorInput ) -> OrchestratorOutput :
@@ -148,6 +149,7 @@ async def orchestrator_agent(agent_input: OrchestratorInput) -> OrchestratorOutp
148149 ...
149150
150151
152+ @pytest .mark .xfail (reason = "Example is flaky" )
151153async def main ():
152154 # Example: Software architecture task
153155 print ("\n Example: Software Architecture Design" )
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " workflowai"
3- version = " 0.6.7 "
3+ version = " 0.6.8 "
44description = " Python SDK for WorkflowAI"
55authors = [" Guillaume Aquilina <guillaume@workflowai.com>" ]
66readme = " README.md"
You can’t perform that action at this time.
0 commit comments