Minimize time to run main CI build action
- Add maven properties for all vector stores such as skip.vectorstore.azure-cosmos-db to control IT test execution - Chroma and PGVector IT tests are enabled by default - Docker Compose and Testcontainers module ITs are skipped by default - Add parallel job to run docker-compose and testcontainers ITs
This commit is contained in:
37
.github/workflows/continuous-integration.yml
vendored
37
.github/workflows/continuous-integration.yml
vendored
@@ -41,7 +41,9 @@ jobs:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
OLLAMA_TESTS_ENABLED: "false"
|
||||
run: mvn -s settings.xml -Pintegration-tests -Pjavadoc -Dfailsafe.rerunFailingTestsCount=3 -DOLLAMA_TESTS_ENABLED=false --batch-mode --update-snapshots deploy
|
||||
run: |
|
||||
mvn -s settings.xml -Pintegration-tests -Pjavadoc -Dfailsafe.rerunFailingTestsCount=3 \
|
||||
--batch-mode --update-snapshots deploy
|
||||
|
||||
- name: Generate Java docs
|
||||
run: mvn javadoc:aggregate
|
||||
@@ -73,3 +75,36 @@ jobs:
|
||||
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: Container integration tests
|
||||
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: Run Container Integration Tests
|
||||
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 }}
|
||||
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 \
|
||||
-am --batch-mode
|
||||
Reference in New Issue
Block a user