0.5.0 release with change log (#914) #406
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" ] | |
| 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 all Docker images, networks, and volumes | |
| docker system prune -af --volumes | |
| docker image prune -af | |
| docker volume prune -af | |
| docker network prune -f | |
| # Clean package caches | |
| sudo apt-get clean | |
| sudo apt-get autoclean | |
| sudo apt-get autoremove -y | |
| # Remove large directories | |
| 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 | |
| # Clean Gradle cache from previous runs | |
| sudo rm -rf /home/runner/.gradle | |
| 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' | |
| # 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@v4 | |
| with: | |
| cache-disabled: true | |
| - 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: JvmOllamaTest with Gradle Wrapper | |
| env: | |
| OLLAMA_IMAGE_URL: ${{ vars.OLLAMA_IMAGE_URL }} | |
| 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 \ | |
| --no-build-cache \ | |
| --no-configuration-cache \ | |
| --continue \ | |
| --stacktrace | |
| echo "=== Test completed, checking disk space ===" | |
| df -h / | tail -1 | |
| timeout-minutes: 60 | |
| - name: Cleanup Docker resources | |
| if: always() | |
| run: | | |
| echo "=== Stopping all containers ===" | |
| docker ps -q | xargs -r docker stop || true | |
| echo "=== Removing all containers ===" | |
| docker ps -aq | xargs -r docker rm -f || true | |
| echo "=== Removing Ollama images ===" | |
| docker images | grep ollama | awk '{print $3}' | xargs -r docker rmi -f || true | |
| echo "=== Pruning system ===" | |
| docker system prune -af --volumes | |
| echo "=== Final disk space ===" | |
| df -h | |
| - 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: Collect reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: reports-${{ matrix.os }}-${{ matrix.artifact-name }} | |
| path: | | |
| **/build/reports/ | |
| retention-days: 7 |