Skip to content

Commit 91f4a3b

Browse files
committed
fix: run all tests regardless of failures and disable AI validation
- Update workflow to continue running all 3 tests even if one fails - Track test results and fail at the end if any test failed - Disable AI validation temporarily (requires Python setup) - Ensures all tests are attempted before workflow fails
1 parent c0c7494 commit 91f4a3b

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/integration-tests-manual.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,29 +55,37 @@ jobs:
5555
run: |
5656
echo "🧪 Running integration tests with Spring AI ${{ inputs.spring_ai_version }}..."
5757
58+
# Track test results
59+
test_results=0
60+
5861
# Test 1: Simple Hello World
5962
echo ""
6063
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
6164
echo "Test 1/3: models/chat/helloworld"
6265
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
63-
./integration-testing/scripts/run-integration-tests.sh "chat/helloworld"
66+
./integration-testing/scripts/run-integration-tests.sh "chat/helloworld" || test_results=$((test_results + 1))
6467
6568
# Test 2: Kotlin Hello World
6669
echo ""
6770
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
6871
echo "Test 2/3: kotlin/kotlin-hello-world"
6972
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
70-
./integration-testing/scripts/run-integration-tests.sh kotlin-hello-world
73+
./integration-testing/scripts/run-integration-tests.sh kotlin-hello-world || test_results=$((test_results + 1))
7174
7275
# Test 3: Function Callback
7376
echo ""
7477
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
7578
echo "Test 3/3: misc/spring-ai-java-function-callback"
7679
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
77-
./integration-testing/scripts/run-integration-tests.sh spring-ai-java-function-callback
80+
./integration-testing/scripts/run-integration-tests.sh spring-ai-java-function-callback || test_results=$((test_results + 1))
7881
7982
echo ""
80-
echo "✅ All 3 examples tested successfully with Spring AI ${{ inputs.spring_ai_version }}"
83+
if [ $test_results -eq 0 ]; then
84+
echo "✅ All 3 examples tested successfully with Spring AI ${{ inputs.spring_ai_version }}"
85+
else
86+
echo "❌ $test_results test(s) failed with Spring AI ${{ inputs.spring_ai_version }}"
87+
exit 1
88+
fi
8189
8290
- name: Run specific test (if filter provided)
8391
if: inputs.test_filter != ''

kotlin/kotlin-hello-world/integration-tests/ExampleInfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"OPENAI_API_KEY"
1010
],
1111
"aiValidation": {
12-
"enabled": true,
12+
"enabled": false,
1313
"validationMode": "primary",
1414
"readmeFile": "../README.md",
1515
"expectedBehavior": "Fetch a joke from OpenAI API, parse it into structured Joke object with setup and punchline fields, and display them properly formatted",

models/chat/helloworld/integration-tests/ExampleInfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"OPENAI_API_KEY"
1111
],
1212
"aiValidation": {
13-
"enabled": true,
13+
"enabled": false,
1414
"validationMode": "primary",
1515
"expectedBehavior": "Accept user input 'tell me a joke' and return a coherent joke response from the AI assistant",
1616
"promptTemplate": "chat_example_validation"

0 commit comments

Comments
 (0)