296 lines
11 KiB
YAML
296 lines
11 KiB
YAML
name: Spring AI Integration Tests
|
|
run-name: Spring AI Integration Tests
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 4 * * 1-5'
|
|
- cron: '0 10 * * 1-5'
|
|
|
|
jobs:
|
|
test-anthropic:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
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: 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 Anthropic model tests
|
|
run: ./mvnw -pl models/spring-ai-anthropic -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
test-azure-openai:
|
|
env:
|
|
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
|
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
|
|
# TODO AZURE_OPENAI_TRANSCRIPTION_DEPLOYMENT_NAME needs to be added when we have a value
|
|
runs-on: ubuntu-latest
|
|
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: 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) }}
|
|
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: 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-huggingface:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
|
|
HUGGINGFACE_CHAT_URL: ${{ secrets.HUGGINGFACE_CHAT_URL }}
|
|
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: 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 Hugging Face model tests
|
|
run: ./mvnw -pl models/spring-ai-huggingface -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
test-mistral-ai:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
MISTRAL_AI_API_KEY: ${{ secrets.MISTRAL_AI_API_KEY }}
|
|
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: 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 Mistral AI model tests
|
|
run: ./mvnw -pl models/spring-ai-mistral-ai -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
# Removed since not able to get keys from ORACLE
|
|
# When keys are available uncomment this code and verify no other structural changes in the other jobs
|
|
# test-oci-genai:
|
|
# runs-on: ubuntu-latest
|
|
# env:
|
|
# OCI_COMPARTMENT_ID_KEY: ${{ secrets.OCI_COMPARTMENT_ID_KEY }}
|
|
# 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: 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 OCI GenAI model tests
|
|
# run: ./mvnw -pl models/spring-ai-oci-genai -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
test-openai:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
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: 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 OpenAI model tests
|
|
run: ./mvnw -pl models/spring-ai-openai -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
test-stability-ai:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
STABILITYAI_API_KEY: ${{ secrets.STABILITYAI_API_KEY }}
|
|
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: 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 Stability AI model tests
|
|
run: ./mvnw -pl models/spring-ai-stability-ai -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
|
|
|
|
test-autoconfigure:
|
|
env:
|
|
# TODO: uncomment keys that have values
|
|
# 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 }}
|
|
# AZURE_OPENAI_TRANSCRIPTION_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_TRANSCRIPTION_DEPLOYMENT_NAME }}
|
|
# ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
# HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
|
|
# HUGGINGFACE_CHAT_URL: ${{ secrets.HUGGINGFACE_CHAT_URL }}
|
|
# MISTRAL_AI_API_KEY: ${{ secrets.MISTRAL_AI_API_KEY }}
|
|
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
# STABILITYAI_API_KEY: ${{ secrets.STABILITYAI_API_KEY }}
|
|
runs-on: ubuntu-latest
|
|
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: 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
|