MCP - LLM Usability E2E #197
This file contains hidden or 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
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| name: MCP - LLM Usability E2E | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| paths: | |
| - '.github/workflows/mcp-llm-usability-e2e.yml' | |
| - 'mcp/**' | |
| - 'distribution/mcp/**' | |
| - 'test/e2e/mcp/**' | |
| schedule: | |
| - cron: '0 19 * * 1-5' | |
| workflow_dispatch: | |
| concurrency: | |
| group: mcp-llm-usability-e2e-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dspotless.apply.skip=true | |
| MCP_LLM_READY_TIMEOUT_SECONDS: '900' | |
| MCP_LLM_REQUEST_TIMEOUT_SECONDS: '300' | |
| MCP_LLM_ARTIFACT_ROOT: test/e2e/mcp/target/llm-e2e | |
| MCP_LLM_SERVER_IMAGE: apache/shardingsphere-mcp-llm-runtime:local | |
| MCP_LLM_BASE_SERVER_IMAGE_DIGEST: sha256:988d2695631987e28a29d98970aaf0e979e23b843a26824abb790ac4245d1d57 | |
| jobs: | |
| global-environment: | |
| name: Import Global Environment | |
| uses: ./.github/workflows/required-reusable.yml | |
| mcp-llm-usability-e2e: | |
| name: MCP - LLM Usability E2E | |
| if: github.repository == 'apache/shardingsphere' | |
| needs: global-environment | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| MCP_LLM_RUN_ID: gha-${{ github.run_id }}-${{ github.run_attempt }} | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: ./.github/workflows/resources/actions/setup-build-environment | |
| with: | |
| java-version: '21' | |
| cache-prefix: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }} | |
| cache-suffix: 'mcp-llm-usability-e2e' | |
| cache-save-enabled: 'false' | |
| enable-docker-setup: 'true' | |
| - name: Set Up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Show Docker Buildx Version | |
| run: docker buildx version | |
| - name: Check Docker Environment | |
| run: | | |
| docker version | |
| docker system df | |
| - name: Build MCP LLM Runtime Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: test/e2e/mcp/src/test/resources/docker/llm-runtime | |
| file: test/e2e/mcp/src/test/resources/docker/llm-runtime/Dockerfile | |
| build-args: | | |
| BASE_IMAGE=ghcr.io/ggml-org/llama.cpp@${{ env.MCP_LLM_BASE_SERVER_IMAGE_DIGEST }} | |
| tags: ${{ env.MCP_LLM_SERVER_IMAGE }} | |
| load: true | |
| cache-from: type=gha,scope=mcp-llm-runtime | |
| cache-to: type=gha,mode=max,scope=mcp-llm-runtime,ignore-error=true | |
| - name: Build MCP E2E Test Dependencies | |
| run: ./mvnw -pl test/e2e/mcp -am install -DskipTests -DskipITs -Dspotless.skip=true -B -ntp | |
| - name: Verify MCP LLM Usability Selector | |
| run: test -f test/e2e/mcp/src/test/java/org/apache/shardingsphere/test/e2e/mcp/llm/suite/usability/LLMUsabilitySuiteE2ETest.java | |
| - name: Run MCP LLM Usability Suite | |
| run: ./mvnw -pl test/e2e/mcp -Pllm-e2e test -DskipITs -Dspotless.skip=true -Dtest=LLMUsabilitySuiteE2ETest -Dsurefire.failIfNoSpecifiedTests=true -B -ntp | |
| - name: Upload MCP LLM Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: mcp-llm-usability-e2e-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: | | |
| test/e2e/mcp/target/llm-e2e | |
| test/e2e/mcp/target/surefire-reports | |
| if-no-files-found: warn |