{"id":19072870,"url":"https://github.com/spring-projects/spring-ai-integration-tests","last_synced_at":"2025-04-13T22:35:01.819Z","repository":{"id":261866924,"uuid":"853087325","full_name":"spring-projects/spring-ai-integration-tests","owner":"spring-projects","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-09T09:08:12.000Z","size":35,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T10:28:55.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spring-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T01:02:55.000Z","updated_at":"2025-04-09T09:08:16.000Z","dependencies_parsed_at":"2025-01-31T14:26:02.490Z","dependency_job_id":"b5626fde-158c-407f-8d1c-83c7bd0b2b9c","html_url":"https://github.com/spring-projects/spring-ai-integration-tests","commit_stats":null,"previous_names":["spring-projects/spring-ai-integration-tests"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-ai-integration-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-ai-integration-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-ai-integration-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-ai-integration-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-projects","download_url":"https://codeload.github.com/spring-projects/spring-ai-integration-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248791241,"owners_count":21162173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T01:44:25.313Z","updated_at":"2025-04-13T22:35:01.628Z","avatar_url":"https://github.com/spring-projects.png","language":null,"readme":"# spring-ai-integration-tests\n\nThis repository contains workflows that define the integration test automation for the Spring AI project.\n\n## Adding Secrets\n\nAll environment variables are stored in GitHub secrets.\n\nTo add or change a secret:\n\n1. Open [spring-projects/spring-ai-integration-tests](https://github.com/spring-projects/spring-ai-integration-tests) in your browser.\n2. If you have permissions, you will see \"Settings\" in the toolbar on that page.\n3. Navigate to **Settings** -\u003e **Security** -\u003e **Secrets and variables** -\u003e **Actions**.\n4. Click **New repository secret** to add a new environment variable for the integration test pipeline.\n\n## Workflow Schedule\n\nThe integration tests run automatically:\n- At 4:00 UTC on weekdays (Monday through Friday)\n- At 10:00 UTC on weekdays (Monday through Friday)\n\nThe workflow can also be triggered manually using the workflow_dispatch event.\n\n## Job Types\n\n### Basic Integration Test Job\n\nExample of a basic integration test job for testing AI models:\n\n```yaml\ntest-mistral-ai:\n  runs-on: ubuntu-latest\n  env:\n    MISTRAL_AI_API_KEY: ${{ secrets.MISTRAL_AI_API_KEY }}\n  steps:\n    - name: Check secrets\n      id: secret_check\n      if: ${{ env.MISTRAL_AI_API_KEY != '' }}\n      run: echo \"Secrets exist\"\n\n    - name: Checkout the action\n      uses: actions/checkout@v4\n\n    - name: Integration Test\n      if: steps.secret_check.conclusion == 'success'\n      uses: ./.github/actions/do-integration-test\n      with:\n        model-name: mistral-ai\n```\n\nThe standard steps:\n- Define required environment variables using GitHub secrets\n- Check if required secrets exist and have values\n- Checkout the repository\n- Run the integration test only if all secrets are available\n\nThe `do-integration-test` action handles:\n- Checking environment variables\n- Checking out the Spring AI source code\n- Setting up JDK 17 with Maven caching\n- Installing the Spring AI code without running tests\n- Executing the integration tests with retry capability for failing tests\n\nThe only customization needed is the model name. The action assumes `models/spring-ai-` prefix, so for the above example with model-name `mistral-ai`, `models/spring-ai-mistral-ai` will be integration tested.\n\n### Multi-Module Test Job\n\nFor testing multiple modules in a single job:\n\n```yaml\ntest-vectorstores:\n  runs-on: ubuntu-latest\n  env:\n    DOCKER_QUIET: 1              # Suppresses Docker CLI progress output\n    TESTCONTAINERS_QUIET: true   # Additional quieting for testcontainers\n    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n    MISTRAL_AI_API_KEY: ${{ secrets.MISTRAL_AI_API_KEY }}\n    OLLAMA_TESTS_ENABLED: true\n  steps:\n    - name: Check secrets\n      id: secret_check\n      if: ${{ env.OPENAI_API_KEY != '' \u0026\u0026 env.MISTRAL_AI_API_KEY != '' }}\n      run: echo \"Secrets exist\"\n\n    - uses: actions/checkout@v4\n\n    - name: Configure Testcontainers\n      run: |\n        mkdir -p $HOME\n        echo \"testcontainers.reuse.enable = true\" \u003e\u003e $HOME/.testcontainers.properties\n\n    - name: Integration Test\n      uses: ./.github/actions/do-multi-module-test\n      with:\n        modules: vector-stores/spring-ai-module1,vector-stores/spring-ai-module2\n```\n\nThe `do-multi-module-test` action is similar to `do-integration-test` but allows testing multiple modules in a single job.\n\n### Autoconfiguration Test\n\nThe autoconfiguration test job runs for Spring Boot autoconfiguration testing. Environment variables in the `env` section control which tests are enabled:\n\n```yaml\ntest-autoconfigure:\n  env:\n    AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}\n    AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}\n    # Additional keys can be uncommented when available\n  runs-on: ubuntu-latest\n```\n\n## Required Environment Variables\n\nThe following environment variables are needed for various tests:\n\n### Vector Store Tests\n```\nOPENAI_API_KEY\nMISTRAL_AI_API_KEY\nOLLAMA_TESTS_ENABLED\n```\n\n### AI Model Tests\n```\nAZURE_OPENAI_API_KEY\nAZURE_OPENAI_ENDPOINT\nAZURE_OPENAI_TRANSCRIPTION_API_KEY\nAZURE_OPENAI_TRANSCRIPTION_ENDPOINT\nAZURE_OPENAI_IMAGE_API_KEY\nAZURE_OPENAI_IMAGE_ENDPOINT\nMISTRAL_AI_API_KEY\n```\n\n## Docker and TestContainers Configuration\n\nFor jobs using Docker or TestContainers, the following environment variables are used to reduce log verbosity:\n```yaml\nenv:\n  DOCKER_QUIET: 1              # Suppresses Docker CLI progress output\n  TESTCONTAINERS_QUIET: true   # Additional quieting for testcontainers\n```\n\nTestContainers reuse is enabled with:\n```bash\necho \"testcontainers.reuse.enable = true\" \u003e\u003e $HOME/.testcontainers.properties\n```\n\n## Additional Tests\n\nThe workflow also includes tests for:\n- Spring AI Integration Tests\n- Docker Compose Support\n- TestContainers Support\n- Spring Cloud Bindings\n\nEach of these tests uses the multi-module test action with appropriate module paths.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects%2Fspring-ai-integration-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-projects%2Fspring-ai-integration-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects%2Fspring-ai-integration-tests/lists"}