Skip to content

docs: move Bedrock Converse to chat folder & add to comparison table #1384

docs: move Bedrock Converse to chat folder & add to comparison table

docs: move Bedrock Converse to chat folder & add to comparison table #1384

name: CI/CD build
on:
push:
branches: [ "main" ]
jobs:
build:
name: Build branch
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Free Disk Space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
large-packages: false
docker-images: false
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Configure Testcontainers
run: |
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
# - name: Cache Docker images.
# uses: ScribeMD/docker-cache@0.3.7
# with:
# key: docker-${{ runner.os }}-${{ hashFiles('**/OllamaImage.java') }}
- name: Build with Maven and deploy to Artifactory
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
OLLAMA_AUTOCONF_TESTS_ENABLED: "true"
run: |
mvn -s settings.xml -Pintegration-tests -Pjavadoc -Dfailsafe.rerunFailingTestsCount=3 \
--batch-mode --update-snapshots deploy
- name: Generate Java docs
run: mvn javadoc:aggregate
- name: Generate assembly
working-directory: spring-ai-docs
run: mvn assembly:single
- name: Capture project version
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
- name: Setup SSH key
env:
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }}
run: |
mkdir "$HOME/.ssh"
echo "$DOCS_SSH_KEY" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
- name: Deploy docs
env:
DOCS_HOST: ${{ secrets.DOCS_HOST }}
DOCS_PATH: ${{ secrets.DOCS_PATH }}
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
working-directory: spring-ai-docs/target
run: |
unzip spring-ai-$PROJECT_VERSION-docs.zip
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION"
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION
# The docker-compose and testcontainers modules will be compiled and run in a parallel job
container-tests:
name: docker-compose and testcontainers modules
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Configure Testcontainers
run: |
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
- name: Build Dependencies
run: |
mvn -s settings.xml clean install \
-DskipTests \
-pl spring-ai-spring-boot-docker-compose,spring-ai-spring-boot-testcontainers \
-am --batch-mode
- name: Run docker-compost and testcontainers Integration Tests
run: |
mvn -s settings.xml -Pintegration-tests verify \
-Dskip.docker-compose=false \
-Dskip.testcontainers=false \
-pl spring-ai-spring-boot-docker-compose,spring-ai-spring-boot-testcontainers \
--batch-mode