Repository navigation
[integrations][java] Add OpenAI embedding model #2843
Workflow file for this run
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: Flink Agents CI | |
| on: | |
| push: | |
| branches: [ main, 'release-*' ] | |
| pull_request: | |
| branches: [ main, 'release-*' ] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Code Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check License Header | |
| run: tools/check-license.sh | |
| - name: Set up JDK | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: 3.12 | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Check code style | |
| run: ./tools/lint.sh -c | |
| - name: Check AGENTS.md freshness | |
| run: python3 tools/check-agents-md.py | |
| - name: Check bundled YAML schema freshness | |
| if: github.ref == 'refs/heads/main' || github.base_ref == 'main' | |
| run: python3 tools/check-skill-schema.py | |
| tools_script_tests: | |
| name: tools script tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install bash 4.1+ (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install bash | |
| - name: Run tools script tests | |
| run: bash tools/test/run.sh | |
| # install.sh and ut.sh both run on the bash macOS ships at /bin/bash for their | |
| # own users: install.sh is documented as `curl ... | bash`, and ut.sh is | |
| # invoked by path from the macOS jobs below. run.sh pins `bash` to the newer | |
| # interpreter the harness itself needs, and that pin reaches the scripts under | |
| # test as well, so this leg points them back at the one they ship against. | |
| tools_script_tests_bash32: | |
| name: tools script tests (macos-latest, subject on bash 3.2) | |
| runs-on: macos-latest | |
| # Declared once for the whole job so the check below and the run below read | |
| # the same value. Setting it on the run step alone would let a misspelled | |
| # key pass the check and then leave the suite spawning the subjects on the | |
| # harness bash, which is the green-over-nothing outcome the check exists to | |
| # prevent. | |
| env: | |
| FLINK_AGENTS_SUT_BASH: /bin/bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Only the subjects move; the harness keeps the version its own | |
| # assertions need. | |
| - name: Install bash 4.1+ for the harness | |
| run: brew install bash | |
| - name: Confirm the subject interpreter is the bash macOS ships | |
| run: | | |
| set -eu | |
| echo "PATH bash: $(command -v bash)" | |
| bash --version | head -1 | |
| : "${FLINK_AGENTS_SUT_BASH:?is not set, so run.sh would spawn the subjects on the harness bash and this job would cover nothing}" | |
| echo "subject: $FLINK_AGENTS_SUT_BASH" | |
| "$FLINK_AGENTS_SUT_BASH" --version | head -1 | |
| major="$("$FLINK_AGENTS_SUT_BASH" -c 'printf %s "${BASH_VERSINFO[0]}"')" | |
| if [ "$major" != "3" ]; then | |
| echo "ERROR: $FLINK_AGENTS_SUT_BASH on this runner is bash ${major}.x," >&2 | |
| echo "not 3.x. This job exists to run the scripts under test on the" >&2 | |
| echo "bash that macOS ships. On a ${major}.x interpreter it repeats" >&2 | |
| echo "the default macOS job and covers nothing, so it fails here" >&2 | |
| echo "rather than report a green result it did not earn." >&2 | |
| exit 1 | |
| fi | |
| - name: Run tools script tests with the subjects on the bash macOS ships | |
| run: bash tools/test/run.sh | |
| build_backend_tests: | |
| name: ut-build-backend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Run build-backend tests | |
| working-directory: python | |
| run: | | |
| uv sync --extra test | |
| PYTHONPATH="${PWD}" uv run --no-sync pytest _build_backend/tests \ | |
| -o log_cli=true \ | |
| -o log_cli_level=INFO | |
| java_tests: | |
| name: ut-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] [python-3.12] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| SKIP_SPOTLESS_CHECK: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ 'macos-latest', 'ubuntu-latest' ] | |
| java-version: ["11", "17", "21"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install java | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install Python dependencies for MCP tests | |
| run: | | |
| cd python | |
| uv sync --all-extras | |
| - name: Run Java Tests | |
| env: | |
| LOG_LEVEL: INFO | |
| run: | | |
| # Add Python venv to PATH so Java tests can find MCP dependencies | |
| export PATH="${{ github.workspace }}/python/.venv/bin:$PATH" | |
| export PYTHONPATH="${{ github.workspace }}/python/.venv/lib/python3.11/site-packages:$PYTHONPATH" | |
| tools/ut.sh -j | |
| python_tests: | |
| name: ut-python [${{ matrix.os }}] [java-17] [python-${{ matrix.python-version}}] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ 'macos-latest', 'ubuntu-latest' ] | |
| python-version: [ '3.10', '3.11', '3.12' ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install java | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Run Python Tests | |
| env: | |
| LOG_LEVEL: INFO | |
| run: tools/ut.sh -p | |
| python_it_tests: | |
| name: it-python [${{ matrix.os }}] [java-17] [python-${{ matrix.python-version}}] [flink-${{ matrix.flink-version}}] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| env: | |
| SKIP_SPOTLESS_CHECK: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: 'ubuntu-latest' | |
| python-version: '3.11' | |
| flink-version: "1.20" | |
| - os: 'ubuntu-latest' | |
| python-version: '3.11' | |
| flink-version: "2.0" | |
| - os: 'ubuntu-latest' | |
| python-version: '3.12' | |
| flink-version: "2.1" | |
| - os: 'ubuntu-latest' | |
| python-version: '3.12' | |
| flink-version: "2.2" | |
| - os: 'ubuntu-latest' | |
| python-version: '3.12' | |
| flink-version: "2.3" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install java | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install flink-agents | |
| run: bash tools/build.sh | |
| - name: Install ollama | |
| run: bash tools/start_ollama_server.sh | |
| - name: Run Python IT | |
| env: | |
| ACTION_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} | |
| run: tools/ut.sh -p -e -f ${{ matrix.flink-version }} | |
| java_it_tests: | |
| name: it-java [${{ matrix.os }}] [java-${{ matrix.java-version}}] [flink-${{ matrix.flink-version}}] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 40 | |
| env: | |
| SKIP_SPOTLESS_CHECK: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: 'ubuntu-latest' | |
| java-version: "17" | |
| flink-version: "1.20" | |
| - os: 'ubuntu-latest' | |
| java-version: "21" | |
| flink-version: "2.0" | |
| - os: 'ubuntu-latest' | |
| java-version: "21" | |
| flink-version: "2.1" | |
| - os: 'ubuntu-latest' | |
| java-version: "21" | |
| flink-version: "2.2" | |
| - os: 'ubuntu-latest' | |
| java-version: "17" | |
| flink-version: "2.3" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install java | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| - name: Install flink-agents Java | |
| run: bash tools/build.sh -j | |
| - name: Install ollama | |
| run: bash tools/start_ollama_server.sh | |
| - name: Run Java IT | |
| env: | |
| ACTION_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} | |
| LOG_LEVEL: INFO | |
| run: tools/ut.sh -j -e -f ${{ matrix.flink-version }} | |
| cross_language_tests: | |
| name: cross-language [${{ matrix.os }}] [python-${{ matrix.python-version}}] [java-${{ matrix.java-version}}] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| env: | |
| SKIP_SPOTLESS_CHECK: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ 'ubuntu-latest' ] | |
| python-version: [ '3.12' ] | |
| java-version: [ '21' ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # Free disk space to ensure Elasticsearch has sufficient space for indexing operations | |
| # This step removes unnecessary pre-installed tools (~30GB) to prevent disk watermark warnings | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be | |
| with: | |
| tool-cache: true | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| - name: Install java | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| - name: Install python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.11.0/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Build flink-agents | |
| run: bash tools/build.sh | |
| - name: Install ollama | |
| run: bash tools/start_ollama_server.sh | |
| - name: Start Elasticsearch | |
| run: | | |
| docker compose -f tools/docker/elasticsearch/docker-compose.yml down -v | |
| docker compose -f tools/docker/elasticsearch/docker-compose.yml up -d | |
| timeout 180 bash -c 'until curl -fsS http://localhost:9200/_cluster/health; do sleep 5; done' | |
| - name: Run Elasticsearch vector-store tests | |
| env: | |
| ES_HOST: http://localhost:9200 | |
| run: | | |
| mvn -B --no-transfer-progress -pl integrations/vector-stores/elasticsearch -am -Dspotless.skip=true -Drat.skip=true -Dtest=ElasticsearchVectorStoreTest -Dsurefire.failIfNoSpecifiedTests=false test | |
| - name: Start Milvus | |
| run: | | |
| docker compose -f tools/docker/milvus/docker-compose.yml down -v | |
| docker compose -f tools/docker/milvus/docker-compose.yml up -d | |
| timeout 180 bash -c 'until curl -fsS http://localhost:9091/healthz; do sleep 5; done' | |
| - name: Run Milvus vector-store tests | |
| env: | |
| MILVUS_URI: http://localhost:19530 | |
| run: | | |
| mvn -B --no-transfer-progress -pl integrations/vector-stores/milvus -am -Dspotless.skip=true -Drat.skip=true -Dtest=MilvusVectorStoreTest -Dsurefire.failIfNoSpecifiedTests=false test | |
| - name: Run e2e tests | |
| env: | |
| ACTION_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }} | |
| LOG_LEVEL: INFO | |
| run: | | |
| export ES_HOST="http://localhost:9200" | |
| export MILVUS_URI="http://localhost:19530" | |
| tools/e2e.sh | |
| - name: Stop Milvus | |
| if: always() | |
| run: docker compose -f tools/docker/milvus/docker-compose.yml down -v | |
| - name: Stop Elasticsearch | |
| if: always() | |
| run: docker compose -f tools/docker/elasticsearch/docker-compose.yml down -v |