From 77c0da6917829c96fdfb442ff8bf0e4b307e7915 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 13 Mar 2024 10:00:00 +0100 Subject: [PATCH] try failur --- .github/workflows/fastembed.yml | 19 ++++--------------- .../tests/test_fastembed_text_embedder.py | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/fastembed.yml b/.github/workflows/fastembed.yml index 74a3311e6..42d66f7f2 100644 --- a/.github/workflows/fastembed.yml +++ b/.github/workflows/fastembed.yml @@ -44,27 +44,16 @@ jobs: - name: Run tests run: hatch run cov - - name: Calculate alert data - id: calculator - shell: bash - if: (success() || failure()) - run: | - if [ "${{ job.status }}" = "success" ]; then - echo "alert_type=success" >> "$GITHUB_OUTPUT"; - else - echo "alert_type=error" >> "$GITHUB_OUTPUT"; - fi - - - name: Send event to Datadog - if: (success() || failure()) + - name: Send failure event to Datadog + if: failure() uses: masci/datadog@v1 with: api-key: ${{ secrets.CORE_DATADOG_API_KEY }} api-url: https://api.datadoghq.eu events: | - - title: "${{ github.workflow }} workflow" + - title: "core-integrations nightly failure: ${{ github.workflow }}" text: "Job ${{ github.job }} in branch ${{ github.ref_name }}" - alert_type: "${{ steps.calculator.outputs.alert_type }}" + alert_type: "error" source_type_name: "Github" host: ${{ github.repository_owner }} tags: diff --git a/integrations/fastembed/tests/test_fastembed_text_embedder.py b/integrations/fastembed/tests/test_fastembed_text_embedder.py index 402980485..73cc395ab 100644 --- a/integrations/fastembed/tests/test_fastembed_text_embedder.py +++ b/integrations/fastembed/tests/test_fastembed_text_embedder.py @@ -207,5 +207,5 @@ def test_run(self): embedding = result["embedding"] assert isinstance(embedding, list) - assert len(embedding) == 384 + assert len(embedding) == 383 assert all(isinstance(emb, float) for emb in embedding)