Spring AI Integration Tests #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |