From dabcfed651263b319e60a9e6d262378cc8c3c63d Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Wed, 19 Jun 2024 17:19:11 +0200 Subject: [PATCH] add retry action for integration tests --- .github/workflows/amazon_bedrock.yml | 25 ++++--- .github/workflows/amazon_sagemaker.yml | 20 +++--- .github/workflows/anthropic.yml | 21 +++--- .github/workflows/astra.yml | 82 +++++++++++----------- .github/workflows/chroma.yml | 74 +++++++++---------- .github/workflows/cohere.yml | 20 +++--- .github/workflows/deepeval.yml | 18 ++--- .github/workflows/elasticsearch.yml | 24 +++---- .github/workflows/fastembed.yml | 24 +++---- .github/workflows/google_ai.yml | 18 ++--- .github/workflows/google_vertex.yml | 18 ++--- .github/workflows/gradient.yml | 76 ++++++++++---------- .github/workflows/instructor_embedders.yml | 18 ++--- .github/workflows/jina.yml | 18 ++--- .github/workflows/langfuse.yml | 20 +++--- .github/workflows/llama_cpp.yml | 78 ++++++++++---------- .github/workflows/mistral.yml | 20 +++--- .github/workflows/mongodb_atlas.yml | 20 +++--- .github/workflows/nvidia.yml | 14 ++-- .github/workflows/ollama.yml | 28 ++++---- .github/workflows/opensearch.yml | 28 ++++---- .github/workflows/optimum.yml | 18 ++--- .github/workflows/pgvector.yml | 28 ++++---- .github/workflows/pinecone.yml | 18 ++--- .github/workflows/qdrant.yml | 18 ++--- .github/workflows/ragas.yml | 20 +++--- .github/workflows/unstructured.yml | 24 +++---- .github/workflows/weaviate.yml | 16 ++--- 28 files changed, 403 insertions(+), 403 deletions(-) diff --git a/.github/workflows/amazon_bedrock.yml b/.github/workflows/amazon_bedrock.yml index c49d52792..61643cb21 100644 --- a/.github/workflows/amazon_bedrock.yml +++ b/.github/workflows/amazon_bedrock.yml @@ -63,26 +63,27 @@ jobs: run: hatch run docs - name: Run unit tests - id: unit-tests - run: hatch run cov -m "not integration" + run: hatch run cov -m "not integration" # Do not authenticate on pull requests from forks - - name: AWS authentication - if: github.event.pull_request.head.repo.full_name == github.repository + - name: AWS authentication + if: github.event.pull_request.head.repo.full_name == github.repository uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 with: aws-region: ${{ env.AWS_REGION }} role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} # Do not run integration tests on pull requests from forks - - name: Run integration tests - if: github.event.pull_request.head.repo.full_name == github.repository - id: integration-tests - run: hatch run cov -m "integration" + - name: Run integration tests with retry + if: github.event.pull_request.head.repo.full_name == github.repository + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov -m "integration" + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" @@ -92,7 +93,5 @@ jobs: uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/amazon_sagemaker.yml b/.github/workflows/amazon_sagemaker.yml index 2f9106181..91cfc3897 100644 --- a/.github/workflows/amazon_sagemaker.yml +++ b/.github/workflows/amazon_sagemaker.yml @@ -54,25 +54,25 @@ jobs: - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index db4c4ce18..0634a56b1 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -53,22 +53,27 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run lint:all - - name: Run tests - run: hatch run cov + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs + + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/astra.yml b/.github/workflows/astra.yml index 74ac1023f..14eaf2b22 100644 --- a/.github/workflows/astra.yml +++ b/.github/workflows/astra.yml @@ -7,8 +7,8 @@ on: - cron: "0 0 * * *" pull_request: paths: - - 'integrations/astra/**' - - '.github/workflows/astra.yml' + - "integrations/astra/**" + - ".github/workflows/astra.yml" defaults: run: @@ -31,52 +31,52 @@ jobs: max-parallel: 1 matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10'] + python-version: ["3.9", "3.10"] steps: - - name: Support longpaths - if: matrix.os == 'windows-latest' - working-directory: . - run: git config --system core.longpaths true + - name: Support longpaths + if: matrix.os == 'windows-latest' + working-directory: . + run: git config --system core.longpaths true - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install Hatch - run: pip install --upgrade hatch + - name: Install Hatch + run: pip install --upgrade hatch - - name: Lint - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run lint:all + - name: Lint + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run lint:all - - name: Generate docs - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs - - name: Run tests - env: - ASTRA_DB_API_ENDPOINT: ${{ secrets.ASTRA_DB_API_ENDPOINT }} - ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + env: + ASTRA_DB_API_ENDPOINT: ${{ secrets.ASTRA_DB_API_ENDPOINT }} + ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - - name: Nightly - run unit tests with Haystack main branch - if: github.event_name == 'schedule' - id: nightly-haystack-main - run: | - hatch run pip install git+https://github.com/deepset-ai/haystack.git - hatch run test -m "not integration" + - name: Nightly - run unit tests with Haystack main branch + if: github.event_name == 'schedule' + run: | + hatch run pip install git+https://github.com/deepset-ai/haystack.git + hatch run test -m "not integration" - - name: Send event to Datadog for nightly failures - if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/send_failure - with: - title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + - name: Send event to Datadog for nightly failures + if: failure() && github.event_name == 'schedule' + uses: ./.github/actions/send_failure + with: + title: | + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/chroma.yml b/.github/workflows/chroma.yml index 616fecf3b..496ddaa03 100644 --- a/.github/workflows/chroma.yml +++ b/.github/workflows/chroma.yml @@ -7,8 +7,8 @@ on: - cron: "0 0 * * *" pull_request: paths: - - 'integrations/chroma/**' - - '.github/workflows/chroma.yml' + - "integrations/chroma/**" + - ".github/workflows/chroma.yml" defaults: run: @@ -30,49 +30,45 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.8', '3.9', '3.10'] + python-version: ["3.8", "3.9", "3.10"] steps: - - name: Support longpaths - if: matrix.os == 'windows-latest' - working-directory: . - run: git config --system core.longpaths true + - name: Support longpaths + if: matrix.os == 'windows-latest' + working-directory: . + run: git config --system core.longpaths true - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install Hatch - run: pip install --upgrade hatch + - name: Install Hatch + run: pip install --upgrade hatch - - name: Lint - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run lint:all + - name: Lint + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run lint:all - - name: Generate docs - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests + run: hatch run cov - - name: Nightly - run unit tests with Haystack main branch - if: github.event_name == 'schedule' - id: nightly-haystack-main - run: | - hatch run pip install git+https://github.com/deepset-ai/haystack.git - hatch run test -m "not integration" - - - name: Send event to Datadog for nightly failures - if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/send_failure - with: - title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + - name: Nightly - run unit tests with Haystack main branch + if: github.event_name == 'schedule' + run: | + hatch run pip install git+https://github.com/deepset-ai/haystack.git + hatch run test -m "not integration" + + - name: Send event to Datadog for nightly failures + if: failure() && github.event_name == 'schedule' + uses: ./.github/actions/send_failure + with: + title: | + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/cohere.yml b/.github/workflows/cohere.yml index 81bf2356d..f9a920cc1 100644 --- a/.github/workflows/cohere.yml +++ b/.github/workflows/cohere.yml @@ -55,25 +55,25 @@ jobs: - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/deepeval.yml b/.github/workflows/deepeval.yml index e987f03f0..4df94446e 100644 --- a/.github/workflows/deepeval.yml +++ b/.github/workflows/deepeval.yml @@ -57,23 +57,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/elasticsearch.yml b/.github/workflows/elasticsearch.yml index c0144a202..da5f5f45e 100644 --- a/.github/workflows/elasticsearch.yml +++ b/.github/workflows/elasticsearch.yml @@ -35,6 +35,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Run ElasticSearch container + run: docker-compose up -d + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -47,30 +50,27 @@ jobs: if: matrix.python-version == '3.9' run: hatch run lint:all - - name: Run ElasticSearch container - run: docker-compose up -d - - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/fastembed.yml b/.github/workflows/fastembed.yml index 7a34378ee..0b872d741 100644 --- a/.github/workflows/fastembed.yml +++ b/.github/workflows/fastembed.yml @@ -20,9 +20,9 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9","3.10","3.11"] - - steps: + python-version: ["3.9", "3.10", "3.11"] + + steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -39,25 +39,25 @@ jobs: - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} + Core integrations nightly tests failure: ${{ github.workflow }} api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/google_ai.yml b/.github/workflows/google_ai.yml index 5563e5633..eb80007b0 100644 --- a/.github/workflows/google_ai.yml +++ b/.github/workflows/google_ai.yml @@ -57,23 +57,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/google_vertex.yml b/.github/workflows/google_vertex.yml index 3677102e4..70b9dd686 100644 --- a/.github/workflows/google_vertex.yml +++ b/.github/workflows/google_vertex.yml @@ -56,23 +56,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/gradient.yml b/.github/workflows/gradient.yml index 61133be87..3bf162d3c 100644 --- a/.github/workflows/gradient.yml +++ b/.github/workflows/gradient.yml @@ -7,8 +7,8 @@ on: - cron: "0 0 * * *" pull_request: paths: - - 'integrations/gradient/**' - - '.github/workflows/gradient.yml' + - "integrations/gradient/**" + - ".github/workflows/gradient.yml" defaults: run: @@ -32,49 +32,49 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10'] + python-version: ["3.9", "3.10"] steps: - - name: Support longpaths - if: matrix.os == 'windows-latest' - working-directory: . - run: git config --system core.longpaths true + - name: Support longpaths + if: matrix.os == 'windows-latest' + working-directory: . + run: git config --system core.longpaths true - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install Hatch - run: pip install --upgrade hatch + - name: Install Hatch + run: pip install --upgrade hatch - - name: Lint - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run lint:all + - name: Lint + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run lint:all - - name: Generate docs - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - - name: Nightly - run unit tests with Haystack main branch - if: github.event_name == 'schedule' - id: nightly-haystack-main - run: | - hatch run pip install git+https://github.com/deepset-ai/haystack.git - hatch run test -m "not integration" + - name: Nightly - run unit tests with Haystack main branch + if: github.event_name == 'schedule' + run: | + hatch run pip install git+https://github.com/deepset-ai/haystack.git + hatch run test -m "not integration" - - name: Send event to Datadog for nightly failures - if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/send_failure - with: - title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + - name: Send event to Datadog for nightly failures + if: failure() && github.event_name == 'schedule' + uses: ./.github/actions/send_failure + with: + title: | + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/instructor_embedders.yml b/.github/workflows/instructor_embedders.yml index 70b604eaa..177c58567 100644 --- a/.github/workflows/instructor_embedders.yml +++ b/.github/workflows/instructor_embedders.yml @@ -34,23 +34,23 @@ jobs: if: runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/jina.yml b/.github/workflows/jina.yml index 69ef6b294..3cf424ab8 100644 --- a/.github/workflows/jina.yml +++ b/.github/workflows/jina.yml @@ -56,23 +56,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/langfuse.yml b/.github/workflows/langfuse.yml index 381b2ed77..cc8daeea6 100644 --- a/.github/workflows/langfuse.yml +++ b/.github/workflows/langfuse.yml @@ -54,28 +54,28 @@ jobs: - name: Lint if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run lint:all - + - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/llama_cpp.yml b/.github/workflows/llama_cpp.yml index 5d906a251..616ac1162 100644 --- a/.github/workflows/llama_cpp.yml +++ b/.github/workflows/llama_cpp.yml @@ -7,8 +7,8 @@ on: - cron: "0 0 * * *" pull_request: paths: - - 'integrations/llama_cpp/**' - - '.github/workflows/llama_cpp.yml' + - "integrations/llama_cpp/**" + - ".github/workflows/llama_cpp.yml" defaults: run: @@ -30,49 +30,49 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10'] + python-version: ["3.9", "3.10"] steps: - - name: Support longpaths - if: matrix.os == 'windows-latest' - working-directory: . - run: git config --system core.longpaths true + - name: Support longpaths + if: matrix.os == 'windows-latest' + working-directory: . + run: git config --system core.longpaths true - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install Hatch - run: pip install --upgrade hatch + - name: Install Hatch + run: pip install --upgrade hatch - - name: Lint - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run lint:all + - name: Lint + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run lint:all - - name: Generate docs - if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + - name: Generate docs + if: matrix.python-version == '3.9' && runner.os == 'Linux' + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - - name: Nightly - run unit tests with Haystack main branch - if: github.event_name == 'schedule' - id: nightly-haystack-main - run: | - hatch run pip install git+https://github.com/deepset-ai/haystack.git - hatch run test -m "not integration" - - - name: Send event to Datadog for nightly failures - if: failure() && github.event_name == 'schedule' - uses: ./.github/actions/send_failure - with: - title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} + - name: Nightly - run unit tests with Haystack main branch + if: github.event_name == 'schedule' + run: | + hatch run pip install git+https://github.com/deepset-ai/haystack.git + hatch run test -m "not integration" + + - name: Send event to Datadog for nightly failures + if: failure() && github.event_name == 'schedule' + uses: ./.github/actions/send_failure + with: + title: | + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/mistral.yml b/.github/workflows/mistral.yml index 8348f1d8f..85d9930cf 100644 --- a/.github/workflows/mistral.yml +++ b/.github/workflows/mistral.yml @@ -52,28 +52,28 @@ jobs: - name: Lint if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run lint:all - + - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/mongodb_atlas.yml b/.github/workflows/mongodb_atlas.yml index 94a540719..50b00f27e 100644 --- a/.github/workflows/mongodb_atlas.yml +++ b/.github/workflows/mongodb_atlas.yml @@ -31,7 +31,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11'] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 @@ -53,23 +53,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/nvidia.yml b/.github/workflows/nvidia.yml index 34e6a3c0e..b91fa662b 100644 --- a/.github/workflows/nvidia.yml +++ b/.github/workflows/nvidia.yml @@ -54,9 +54,12 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run lint:all - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' @@ -64,7 +67,6 @@ jobs: - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" @@ -74,7 +76,5 @@ jobs: uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} + Core integrations nightly tests failure: ${{ github.workflow }} api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/ollama.yml b/.github/workflows/ollama.yml index 631c155eb..68ad47451 100644 --- a/.github/workflows/ollama.yml +++ b/.github/workflows/ollama.yml @@ -32,16 +32,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9","3.10","3.11"] - - steps: + python-version: ["3.9", "3.10", "3.11"] + + steps: - uses: actions/checkout@v4 - name: Install Ollama and pull the required models run: | curl -fsSL https://ollama.com/install.sh | sh ollama serve & - + # Check if the service is up and running with a timeout of 60 seconds timeout=60 while [ $timeout -gt 0 ] && ! curl -sSf http://localhost:11434/ > /dev/null; do @@ -54,7 +54,7 @@ jobs: echo "Timed out waiting for Ollama service to start." exit 1 fi - + ollama pull ${{ env.LLM_FOR_TESTS }} ollama pull ${{ env.EMBEDDER_FOR_TESTS }} @@ -74,23 +74,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/opensearch.yml b/.github/workflows/opensearch.yml index ed7967d79..ad9fb613d 100644 --- a/.github/workflows/opensearch.yml +++ b/.github/workflows/opensearch.yml @@ -20,7 +20,7 @@ env: defaults: run: - working-directory: integrations/opensearch + working-directory: integrations/opensearch jobs: run: @@ -35,6 +35,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Run opensearch container + run: docker-compose up -d + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -47,30 +50,27 @@ jobs: if: matrix.python-version == '3.9' run: hatch run lint:all - - name: Run opensearch container - run: docker-compose up -d - - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/optimum.yml b/.github/workflows/optimum.yml index c6ae9a0ee..2754b191b 100644 --- a/.github/workflows/optimum.yml +++ b/.github/workflows/optimum.yml @@ -56,23 +56,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/pgvector.yml b/.github/workflows/pgvector.yml index 288da8e9d..6cd13dc4a 100644 --- a/.github/workflows/pgvector.yml +++ b/.github/workflows/pgvector.yml @@ -20,7 +20,7 @@ env: defaults: run: - working-directory: integrations/pgvector + working-directory: integrations/pgvector jobs: run: @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.9","3.10","3.11"] + python-version: ["3.9", "3.10", "3.11"] services: pgvector: image: ankane/pgvector:latest @@ -40,8 +40,8 @@ jobs: POSTGRES_DB: postgres ports: - 5432:5432 - - steps: + + steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -58,25 +58,25 @@ jobs: - name: Generate docs if: matrix.python-version == '3.9' && runner.os == 'Linux' - run: hatch run docs + run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/pinecone.yml b/.github/workflows/pinecone.yml index b26f2a793..ef22be52f 100644 --- a/.github/workflows/pinecone.yml +++ b/.github/workflows/pinecone.yml @@ -60,25 +60,25 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 env: INDEX_NAME: ${{ matrix.INDEX_NAME }} - run: hatch run cov + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/qdrant.yml b/.github/workflows/qdrant.yml index 5995911fb..2c2fd0002 100644 --- a/.github/workflows/qdrant.yml +++ b/.github/workflows/qdrant.yml @@ -56,23 +56,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/ragas.yml b/.github/workflows/ragas.yml index af67484ad..ab11b348a 100644 --- a/.github/workflows/ragas.yml +++ b/.github/workflows/ragas.yml @@ -21,7 +21,7 @@ concurrency: env: PYTHONUNBUFFERED: "1" FORCE_COLOR: "1" - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} jobs: run: @@ -57,23 +57,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/unstructured.yml b/.github/workflows/unstructured.yml index 52a6a89a8..6b642a8d0 100644 --- a/.github/workflows/unstructured.yml +++ b/.github/workflows/unstructured.yml @@ -8,11 +8,11 @@ on: pull_request: paths: - "integrations/unstructured/**" - - ".github/workflows/unstructured.yml" + - ".github/workflows/unstructured.yml" defaults: run: - working-directory: integrations/unstructured + working-directory: integrations/unstructured concurrency: group: unstructured-${{ github.head_ref }} @@ -48,7 +48,7 @@ jobs: --health-interval 10s \ --health-timeout 1s \ --health-retries 10 \ - quay.io/unstructured-io/unstructured-api:latest + quay.io/unstructured-io/unstructured-api:latest - uses: actions/checkout@v4 @@ -68,23 +68,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} - api-key: ${{ secrets.CORE_DATADOG_API_KEY }} \ No newline at end of file + Core integrations nightly tests failure: ${{ github.workflow }} + api-key: ${{ secrets.CORE_DATADOG_API_KEY }} diff --git a/.github/workflows/weaviate.yml b/.github/workflows/weaviate.yml index 2588d4113..38ef2aebf 100644 --- a/.github/workflows/weaviate.yml +++ b/.github/workflows/weaviate.yml @@ -53,23 +53,23 @@ jobs: if: matrix.python-version == '3.9' && runner.os == 'Linux' run: hatch run docs - - name: Run tests - id: tests - run: hatch run cov + - name: Run tests with retry + uses: Wandalen/wretry.action@v3 + with: + command: hatch run cov + attempt_limit: 3 + attempt_delay: 2000 - name: Nightly - run unit tests with Haystack main branch if: github.event_name == 'schedule' - id: nightly-haystack-main run: | hatch run pip install git+https://github.com/deepset-ai/haystack.git hatch run test -m "not integration" - + - name: Send event to Datadog for nightly failures if: failure() && github.event_name == 'schedule' uses: ./.github/actions/send_failure with: title: | - core-integrations failure: - ${{ (steps.tests.conclusion == 'nightly-haystack-main') && 'nightly-haystack-main' || 'tests' }} - - ${{ github.workflow }} + Core integrations nightly tests failure: ${{ github.workflow }} api-key: ${{ secrets.CORE_DATADOG_API_KEY }}