Update MCP SDK version to 0.7.7 (#1154) #577
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
| name: Ollama Tests | |
| on: | |
| workflow_dispatch: # Manual trigger | |
| push: | |
| branches: [ "main", "develop" ] | |
| env: | |
| OLLAMA_VERSION: "0.12.6" | |
| jobs: | |
| integration-tests: | |
| name: ${{ matrix.job-name }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| include: | |
| - job-name: "ollama-executor-tests" | |
| test-group: "ai.koog.integration.tests.executor.OllamaExecutorIntegrationTest" | |
| artifact-name: "ollama-executor-tests" | |
| os: ubuntu-latest | |
| - job-name: "ollama-agent-tests" | |
| test-group: "ai.koog.integration.tests.agent.OllamaAgentIntegrationTest" | |
| artifact-name: "ollama-agent-tests" | |
| os: ubuntu-latest | |
| - job-name: "ollama-simple-agent-tests" | |
| test-group: "ai.koog.integration.tests.agent.OllamaSimpleAgentIntegrationTest" | |
| artifact-name: "ollama-simple-agent-tests" | |
| os: ubuntu-latest | |
| fail-fast: false | |
| steps: | |
| - name: Configure Git | |
| run: git config --global core.autocrlf input | |
| - name: Free up disk space | |
| run: | | |
| echo "=== Disk space before cleanup ===" | |
| df -h | |
| echo "=== Docker system info ===" | |
| docker system df | |
| # Stop and remove all containers | |
| docker ps -aq | xargs -r docker rm -f || true | |
| # Remove Docker images and networks (but keep volumes for potential caching) | |
| docker system prune -af | |
| docker image prune -af | |
| docker network prune -f | |
| # Remove large directories that we don't need | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| sudo rm -rf /opt/az | |
| sudo rm -rf /usr/share/swift | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /usr/local/.ghcup | |
| sudo rm -rf /home/runner/.dotnet | |
| sudo rm -rf /opt/hostedtoolcache | |
| # Clean npm and yarn caches | |
| sudo rm -rf /home/runner/.npm | |
| sudo rm -rf /home/runner/.yarn | |
| echo "=== Disk space after cleanup ===" | |
| df -h | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'corretto' | |
| cache: gradle | |
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Check disk space before tests | |
| run: | | |
| echo "=== Disk space ===" | |
| df -h | |
| echo "=== Available space in GB ===" | |
| df -BG / | tail -1 | awk '{print "Available: " $4}' | |
| echo "=== Docker info ===" | |
| docker system df | |
| echo "=== Memory info ===" | |
| free -h | |
| - name: Install and start Ollama | |
| run: | | |
| echo "=== Installing Ollama ===" | |
| curl -fsSL https://ollama.com/install.sh | sh | |
| echo "=== Starting Ollama in background ===" | |
| nohup ollama serve > /tmp/ollama.log 2>&1 & | |
| OLLAMA_PID=$! | |
| echo "OLLAMA_PID=$OLLAMA_PID" >> $GITHUB_ENV | |
| echo "Ollama PID: $OLLAMA_PID" | |
| echo "=== Waiting for Ollama to be ready ===" | |
| timeout 10 bash -c 'until curl -s http://localhost:11434 > /dev/null 2>&1; do echo "Waiting..."; sleep 2; done' | |
| echo "=== Ollama started successfully ===" | |
| curl -s http://localhost:11434 | |
| - name: JvmOllamaTest with Gradle Wrapper | |
| env: | |
| OLLAMA_LOCAL_URL: http://localhost:11434 | |
| GRADLE_OPTS: "-Dorg.gradle.daemon=false -Xmx1g -XX:MaxMetaspaceSize=512m" | |
| run: | | |
| echo "=== Starting tests with available disk space ===" | |
| df -h / | tail -1 | |
| ./gradlew jvmOllamaTest \ | |
| --tests "${{ matrix.test-group }}" \ | |
| --no-parallel \ | |
| --no-daemon \ | |
| --continue \ | |
| --stacktrace | |
| echo "=== Test completed, checking disk space ===" | |
| df -h / | tail -1 | |
| timeout-minutes: 60 | |
| - name: Check disk space after tests | |
| if: always() | |
| run: | | |
| echo "=== Final disk space check ===" | |
| df -h | |
| echo "=== Available space in GB ===" | |
| df -BG / | tail -1 | awk '{print "Available: " $4}' | |
| echo "=== Docker system info ===" | |
| docker system df | |
| echo "=== Largest directories in /home/runner ===" | |
| sudo du -sh /home/runner/* 2>/dev/null | sort -hr | head -10 || true | |
| - name: Stop Ollama | |
| if: always() | |
| run: | | |
| echo "=== Stopping Ollama ===" | |
| if [ -n "$OLLAMA_PID" ]; then | |
| kill $OLLAMA_PID || true | |
| echo "Ollama process $OLLAMA_PID stopped" | |
| else | |
| echo "No Ollama PID found, attempting pkill" | |
| pkill -f "ollama serve" || true | |
| fi | |
| echo "=== Ollama logs (last 50 lines) ===" | |
| tail -50 /tmp/ollama.log || echo "No Ollama logs found" | |
| - name: Collect reports | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: reports-${{ matrix.os }}-${{ matrix.artifact-name }} | |
| path: | | |
| **/build/reports/ | |
| retention-days: 7 |