Add Spring AI integration test workflows
- Azure OpenAI, Bedrock jobs in automated workflow - MiniMax, Moonshot, Qianfan, and Zhipu AI jobs in manual-only workflow - Spring Boot Autoconfigure jobs in both workflows - Secrets configured and consumed from repository-level secrets for actions
This commit is contained in:
147
.github/workflows/spring-ai-integration-tests-manual-only.yml
vendored
Normal file
147
.github/workflows/spring-ai-integration-tests-manual-only.yml
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
name: Spring AI Integration Tests (Manual Only)
|
||||
run-name: Spring AI Integration Tests (Manual Only)
|
||||
on:
|
||||
- workflow_dispatch
|
||||
|
||||
jobs:
|
||||
test-minimax:
|
||||
env:
|
||||
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run MiniMax model tests
|
||||
run: ./mvnw -pl models/spring-ai-minimax -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-moonshot:
|
||||
env:
|
||||
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Moonshot model tests
|
||||
run: ./mvnw -pl models/spring-ai-moonshot -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-qianfan:
|
||||
env:
|
||||
QIANFAN_API_KEY: ${{ secrets.QIANFAN_API_KEY }}
|
||||
QIANFAN_SECRET_KEY: ${{ secrets.QIANFAN_SECRET_KEY }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Qianfan model tests
|
||||
run: ./mvnw -pl models/spring-ai-qianfan -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-zhipu-ai:
|
||||
env:
|
||||
ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Zhipu AI model tests
|
||||
run: ./mvnw -pl models/spring-ai-zhipu -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-autoconfigure:
|
||||
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 }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Spring Boot Autoconfigure tests
|
||||
run: ./mvnw -pl spring-ai-spring-boot-autoconfigure -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
90
.github/workflows/spring-ai-integration-tests.yml
vendored
Normal file
90
.github/workflows/spring-ai-integration-tests.yml
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
name: Spring AI Integration Tests
|
||||
run-name: Spring AI Integration Tests
|
||||
on:
|
||||
- push
|
||||
- workflow_dispatch
|
||||
|
||||
jobs:
|
||||
test-azure:
|
||||
env:
|
||||
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
||||
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Azure OpenAI model tests
|
||||
run: ./mvnw -pl models/spring-ai-azure-openai -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-bedrock:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
steps:
|
||||
- name: Check environment
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const env = ${{ toJson(env) }}
|
||||
Object.values(env).some(v => v.length === 0) &&
|
||||
core.setFailed('Missing one or more secrets: ' + Object.keys(env).join(', '));
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Bedrock model tests
|
||||
run: ./mvnw -pl models/spring-ai-bedrock -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
|
||||
test-autoconfigure:
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
||||
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: spring-projects/spring-ai
|
||||
ref: refs/heads/main
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
- name: Install
|
||||
run: ./mvnw install -DskipTests
|
||||
- name: Run Spring Boot Autoconfigure tests
|
||||
run: ./mvnw -pl spring-ai-spring-boot-autoconfigure -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
||||
Reference in New Issue
Block a user