From 5bc9b3d64e872107b3d9ff7ef75ba7c56f085b8b Mon Sep 17 00:00:00 2001 From: Aliaksandr Kuzmik <98702584+alexkuzmik@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:31:30 +0100 Subject: [PATCH] Add missing workflow, fix typo in requirements format (#908) --- .github/workflows/lib-haystack-tests.yml | 51 +++++++++++++++++++ .../lib-integration-tests-runner.yml | 7 +++ .../{requirements.text => requirements.txt} | 0 3 files changed, 58 insertions(+) create mode 100644 .github/workflows/lib-haystack-tests.yml rename sdks/python/tests/library_integration/haystack/{requirements.text => requirements.txt} (100%) diff --git a/.github/workflows/lib-haystack-tests.yml b/.github/workflows/lib-haystack-tests.yml new file mode 100644 index 0000000000..ef80b5f06d --- /dev/null +++ b/.github/workflows/lib-haystack-tests.yml @@ -0,0 +1,51 @@ +# Workflow to run Haystack tests +# +# Please read inputs to provide correct values. +# +name: SDK Lib Haystack Tests +run-name: "SDK Lib Haystack Tests ${{ github.ref_name }} by @${{ github.actor }}" +env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + OPENAI_ORG_ID: ${{ secrets.OPENAI_ORG_ID }} +on: + workflow_call: + +jobs: + tests: + name: Haystack Python ${{matrix.python_version}} + runs-on: ubuntu-latest + defaults: + run: + working-directory: sdks/python + + strategy: + fail-fast: true + matrix: + python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Setup Python ${{matrix.python_version}} + uses: actions/setup-python@v5 + with: + python-version: ${{matrix.python_version}} + + - name: Install opik + run: pip install . + + - name: Install test tools + run: | + cd ./tests + pip install --no-cache-dir --disable-pip-version-check -r test_requirements.txt + + - name: Install lib + run: | + cd ./tests + pip install --no-cache-dir --disable-pip-version-check -r library_integration/haystack/requirements.txt + + - name: Run tests + run: | + cd ./tests/library_integration/haystack/ + python -m pytest -vv . \ No newline at end of file diff --git a/.github/workflows/lib-integration-tests-runner.yml b/.github/workflows/lib-integration-tests-runner.yml index de81e5b3fc..1b209cbd77 100644 --- a/.github/workflows/lib-integration-tests-runner.yml +++ b/.github/workflows/lib-integration-tests-runner.yml @@ -15,6 +15,8 @@ on: - langchain - llama_index - anthropic + - aisuite + - haystack schedule: - cron: "0 0 */1 * *" pull_request: @@ -73,3 +75,8 @@ jobs: uses: ./.github/workflows/lib-aisuite-tests.yml secrets: inherit + haystack_tests: + needs: [init_environment] + if: contains(fromJSON('["haystack", "all"]'), needs.init_environment.outputs.LIBS) + uses: ./.github/workflows/lib-haystack-tests.yml + secrets: inherit diff --git a/sdks/python/tests/library_integration/haystack/requirements.text b/sdks/python/tests/library_integration/haystack/requirements.txt similarity index 100% rename from sdks/python/tests/library_integration/haystack/requirements.text rename to sdks/python/tests/library_integration/haystack/requirements.txt