Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
497 changes: 497 additions & 0 deletions .github/actions/do-autoconfigure-test/action.yml

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions .github/actions/do-integration-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Run Spring AI Integration Test"
description: "Run integration tests for a single Spring AI model module"

inputs:
model-name:
description: "Spring AI model to integration test (e.g. ollama, anthropic, mistral-ai)"
required: true
maven-properties:
description: "Additional Maven properties to pass to the build"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Check environment
uses: actions/github-script@v7
with:
script: |
const env = ${{ toJson(env) }}
const emptyEnvEntries = Object.entries(env).filter(e => e[1].length === 0)
emptyEnvEntries.length > 0 &&
core.setFailed('Missing value for environment variable(s): ' + emptyEnvEntries.map(e => e[0]).join(', '));

- name: Run ${{ inputs.model-name }} model tests
shell: bash
run: |
echo 'Running with maven properties:' ${{ inputs.maven-properties }}
./mvnw --batch-mode -ntp --no-snapshot-updates \
-pl models/spring-ai-${{ inputs.model-name }} \
-Pintegration-tests \
${{ inputs.maven-properties }} \
-Dfailsafe.rerunFailingTestsCount=2 \
verify
34 changes: 34 additions & 0 deletions .github/actions/do-multi-module-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Run Spring AI Multi-Module Integration Tests"
description: "Run integration tests for multiple Spring AI modules"

inputs:
modules:
description: "Comma-separated list of modules to test"
required: true
maven-properties:
description: "Additional Maven properties to pass to the build"
required: false
default: ""

runs:
using: "composite"
steps:
- name: Check environment
uses: actions/github-script@v7
with:
script: |
const env = ${{ toJson(env) }}
const emptyEnvEntries = Object.entries(env).filter(e => e[1].length === 0)
emptyEnvEntries.length > 0 &&
core.setFailed('Missing value for environment variable(s): ' + emptyEnvEntries.map(e => e[0]).join(', '));

- name: Run integration tests
shell: bash
run: |
echo 'Running with maven properties:' ${{ inputs.maven-properties }}
./mvnw --batch-mode -ntp --no-snapshot-updates \
-pl ${{ inputs.modules }} \
-Pintegration-tests \
${{ inputs.maven-properties }} \
-Dfailsafe.rerunFailingTestsCount=2 \
verify
132 changes: 132 additions & 0 deletions .github/workflows/spring-ai-integration-tests-manual-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Spring AI Integration Tests (Manual Only)
run-name: Spring AI Integration Tests (Manual Only)

on:
- workflow_dispatch

jobs:

test-minimax:
if: ${{ github.repository_owner == 'spring-projects' }}
runs-on: ubuntu-latest
env:
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'

- name: Build all modules
run: ./mvnw --batch-mode -ntp install -DskipTests

- name: Integration Test
uses: ./.github/actions/do-integration-test
with:
model-name: minimax

test-moonshot:
if: ${{ github.repository_owner == 'spring-projects' }}
runs-on: ubuntu-latest
env:
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'

- name: Build all modules
run: ./mvnw --batch-mode -ntp install -DskipTests

- name: Integration Test
uses: ./.github/actions/do-integration-test
with:
model-name: moonshot

test-qianfan:
if: ${{ github.repository_owner == 'spring-projects' }}
runs-on: ubuntu-latest
env:
QIANFAN_API_KEY: ${{ secrets.QIANFAN_API_KEY }}
QIANFAN_SECRET_KEY: ${{ secrets.QIANFAN_SECRET_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'

- name: Build all modules
run: ./mvnw --batch-mode -ntp install -DskipTests

- name: Integration Test
uses: ./.github/actions/do-integration-test
with:
model-name: qianfan

test-zhipu-ai:
if: ${{ github.repository_owner == 'spring-projects' }}
runs-on: ubuntu-latest
env:
ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'

- name: Build all modules
run: ./mvnw --batch-mode -ntp install -DskipTests

- name: Integration Test
uses: ./.github/actions/do-integration-test
with:
model-name: zhipuai

test-autoconfigure:
if: ${{ github.repository_owner == 'spring-projects' }}
runs-on: ubuntu-latest
env:
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
QIANFAN_API_KEY: ${{ secrets.QIANFAN_API_KEY }}
QIANFAN_SECRET_KEY: ${{ secrets.QIANFAN_SECRET_KEY }}
ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }}
steps:
- name: Checkout source code
uses: actions/checkout@v6

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'

- name: Build all modules
run: ./mvnw --batch-mode -ntp install -DskipTests

- name: Autoconfigure Test
uses: ./.github/actions/do-autoconfigure-test
with:
spring-ai-branch: main
Loading
Loading