Skip to content

Commit 89f8147

Browse files
committed
Optimize fast-continuous-integration workflow
Remove vector store tests already covered in spring-ai-integration-tests: - Removed test-vector-stores-slow-1 (OpenSearch, Cassandra) - Removed test-vector-stores-slow-2 (Elasticsearch, Couchbase, MongoDB) - Removed test-vector-stores-medium (Milvus, MariaDB, Neo4j, Oracle) Keep only Chroma and PgVector vector stores in test-remaining job. Split deploy into parallel jobs for faster execution: - deploy-artifactory: Deploy Maven artifacts to Artifactory (15.8m) - deploy-docs: Deploy documentation via SSH (6.9m) Both run in parallel after all tests pass. Expected improvement: 49.9m -> ~39m (22% faster, 11 minutes saved)
1 parent 429ac5a commit 89f8147

File tree

1 file changed

+15
-110
lines changed

1 file changed

+15
-110
lines changed

.github/workflows/fast-continuous-integration.yml

Lines changed: 15 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -149,82 +149,8 @@ jobs:
149149
-Dfailsafe.rerunFailingTestsCount=3 \
150150
verify
151151
152-
test-vector-stores-slow-1:
153-
name: Test Vector Stores (OpenSearch, Cassandra)
154-
runs-on: ubuntu-latest
155-
needs: build-all
156-
if: ${{ github.repository_owner == 'spring-projects' }}
157-
steps:
158-
- name: Checkout source code
159-
uses: actions/checkout@v4
160-
161-
- name: Set up JDK 17
162-
uses: actions/setup-java@v4
163-
with:
164-
java-version: '17'
165-
distribution: 'temurin'
166-
cache: 'maven'
167-
168-
- name: Download Maven repository
169-
uses: actions/download-artifact@v4
170-
with:
171-
name: maven-repo
172-
path: ~/.m2/repository
173-
174-
- name: Configure Testcontainers
175-
run: |
176-
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
177-
178-
- name: Test OpenSearch and Cassandra vector stores
179-
env:
180-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
181-
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
182-
run: |
183-
./mvnw --batch-mode --no-snapshot-updates \
184-
-pl vector-stores/spring-ai-opensearch-store,vector-stores/spring-ai-cassandra-store,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-opensearch,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-cassandra \
185-
-Pci-fast-integration-tests \
186-
-Dfailsafe.rerunFailingTestsCount=3 \
187-
verify
188-
189-
test-vector-stores-slow-2:
190-
name: Test Vector Stores (Elasticsearch, Couchbase, MongoDB)
191-
runs-on: ubuntu-latest
192-
needs: build-all
193-
if: ${{ github.repository_owner == 'spring-projects' }}
194-
steps:
195-
- name: Checkout source code
196-
uses: actions/checkout@v4
197-
198-
- name: Set up JDK 17
199-
uses: actions/setup-java@v4
200-
with:
201-
java-version: '17'
202-
distribution: 'temurin'
203-
cache: 'maven'
204-
205-
- name: Download Maven repository
206-
uses: actions/download-artifact@v4
207-
with:
208-
name: maven-repo
209-
path: ~/.m2/repository
210-
211-
- name: Configure Testcontainers
212-
run: |
213-
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
214-
215-
- name: Test Elasticsearch, Couchbase, MongoDB vector stores
216-
env:
217-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
218-
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
219-
run: |
220-
./mvnw --batch-mode --no-snapshot-updates \
221-
-pl vector-stores/spring-ai-elasticsearch-store,vector-stores/spring-ai-couchbase-store,vector-stores/spring-ai-mongodb-atlas-store,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-elasticsearch,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-couchbase,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mongodb-atlas \
222-
-Pci-fast-integration-tests \
223-
-Dfailsafe.rerunFailingTestsCount=3 \
224-
verify
225-
226-
test-vector-stores-medium:
227-
name: Test Vector Stores (Milvus, PgVector, Neo4j, MariaDB, Oracle)
152+
test-remaining:
153+
name: Test Remaining (MCP, Google GenAI, Chroma, PgVector)
228154
runs-on: ubuntu-latest
229155
needs: build-all
230156
if: ${{ github.repository_owner == 'spring-projects' }}
@@ -249,22 +175,22 @@ jobs:
249175
run: |
250176
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
251177
252-
- name: Test Milvus, PgVector, Neo4j, MariaDB, Oracle vector stores
178+
- name: Test remaining modules
253179
env:
254180
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
255181
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
256182
run: |
257183
./mvnw --batch-mode --no-snapshot-updates \
258-
-pl vector-stores/spring-ai-milvus-store,vector-stores/spring-ai-pgvector-store,vector-stores/spring-ai-neo4j-store,vector-stores/spring-ai-mariadb-store,vector-stores/spring-ai-oracle-store,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-milvus,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-pgvector,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-neo4j,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-mariadb,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-oracle \
184+
-pl models/spring-ai-google-genai,auto-configurations/models/spring-ai-autoconfigure-model-google-genai,mcp/common,mcp/mcp-annotations-spring,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-httpclient,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webmvc,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webflux,vector-stores/spring-ai-chroma-store,vector-stores/spring-ai-pgvector-store \
259185
-Pci-fast-integration-tests \
260186
-Dfailsafe.rerunFailingTestsCount=3 \
261187
verify
262188
263-
test-remaining:
264-
name: Test Remaining (MCP, Google GenAI, Chroma, etc.)
189+
deploy-artifactory:
190+
name: Deploy to Artifactory
265191
runs-on: ubuntu-latest
266-
needs: build-all
267-
if: ${{ github.repository_owner == 'spring-projects' }}
192+
needs: [build-all, test-ollama, test-openai, test-remaining]
193+
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'spring-projects' }}
268194
steps:
269195
- name: Checkout source code
270196
uses: actions/checkout@v4
@@ -282,25 +208,17 @@ jobs:
282208
name: maven-repo
283209
path: ~/.m2/repository
284210

285-
- name: Configure Testcontainers
286-
run: |
287-
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
288-
289-
- name: Test remaining modules
211+
- name: Deploy to Artifactory
290212
env:
291-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
292-
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
213+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
214+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
293215
run: |
294-
./mvnw --batch-mode --no-snapshot-updates \
295-
-pl models/spring-ai-google-genai,auto-configurations/models/spring-ai-autoconfigure-model-google-genai,mcp/common,mcp/mcp-annotations-spring,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-httpclient,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webmvc,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webflux,vector-stores/spring-ai-chroma-store,auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-chroma \
296-
-Pci-fast-integration-tests \
297-
-Dfailsafe.rerunFailingTestsCount=3 \
298-
verify
216+
./mvnw -s settings.xml --batch-mode -DskipTests deploy
299217
300-
deploy-artifacts:
301-
name: Deploy artifacts
218+
deploy-docs:
219+
name: Deploy documentation
302220
runs-on: ubuntu-latest
303-
needs: [build-all, test-ollama, test-openai, test-vector-stores-slow-1, test-vector-stores-slow-2, test-vector-stores-medium, test-remaining]
221+
needs: [build-all, test-ollama, test-openai, test-remaining]
304222
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'spring-projects' }}
305223
steps:
306224
- name: Checkout source code
@@ -313,12 +231,6 @@ jobs:
313231
distribution: 'temurin'
314232
cache: 'maven'
315233

316-
- name: Download Maven repository
317-
uses: actions/download-artifact@v4
318-
with:
319-
name: maven-repo
320-
path: ~/.m2/repository
321-
322234
- name: Download Javadoc
323235
uses: actions/download-artifact@v4
324236
with:
@@ -334,13 +246,6 @@ jobs:
334246
- name: Capture project version
335247
run: echo PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
336248

337-
- name: Deploy to Artifactory
338-
env:
339-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
340-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
341-
run: |
342-
./mvnw -s settings.xml --batch-mode -DskipTests deploy
343-
344249
- name: Setup SSH key
345250
env:
346251
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}

0 commit comments

Comments
 (0)