Skip to content

Commit d4144a0

Browse files
authored
Merge pull request #296 from mistralai/alex/fix_running_example_script
fix: example script not failing correctly
2 parents 747341e + e4d3ea3 commit d4144a0

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/sdk_generation_mistralai_sdk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ jobs:
2424
speakeasy_version: latest
2525
target: mistralai-sdk
2626
secrets:
27-
github_access_token: ${{ secrets.SPEAKEASY_WORKFLOW_GITHUB_PAT }}
27+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
2828
pypi_token: ${{ secrets.PYPI_TOKEN }}
2929
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

scripts/run_examples.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,26 @@ exclude_files=(
3939
"examples/mistral/mcp_servers/stdio_server.py"
4040
"examples/mistral/agents/async_conversation_run_stream.py"
4141
"examples/mistral/agents/async_conversation_run_mcp.py"
42-
"examples/mistral/agents/async_conversation_run_mcp_remote.py"
42+
"examples/mistral/agents/async_conversation_run_mcp_remote.py"
4343
)
4444

4545
# Check if the no-extra-dep flag is set
4646
if [ "$NO_EXTRA_DEP" = true ]; then
4747
# Add more files to the exclude list
4848
exclude_files+=(
49-
"examples/mistral/agents/async_conversation_run_mcp_remote.py"
5049
"examples/mistral/agents/async_conversation_run_stream.py"
5150
"examples/mistral/agents/async_conversation_run.py"
51+
"examples/mistral/agents/async_multi_turn_conversation.py"
5252
)
5353
fi
5454

5555
failed=0
5656

57+
echo "Skipping scripts"
58+
for file in "${exclude_files[@]}"; do
59+
echo "$file"
60+
done
61+
5762
# Function to run a test with retries
5863
run_test_with_retries() {
5964
local file="$1"
@@ -64,8 +69,8 @@ run_test_with_retries() {
6469
echo "Running $file (attempt $attempt/$RETRY_COUNT)"
6570

6671
# Run the script and capture both exit status and error output
67-
local current_output=$(python3 "$file" 2>&1)
68-
local exit_code=$?
72+
current_output=$(python3 "$file" 2>&1)
73+
exit_code=$?
6974

7075
if [ $exit_code -eq 0 ]; then
7176
echo "Success"

0 commit comments

Comments
 (0)