Skip to content

Commit

Permalink
ci: Add job for ES8 integration tests (#5297)
Browse files Browse the repository at this point in the history
* Add job for ES8 integration tests

* Remove whitespace

* Fix filename

* Add tests.yml

* Revert "Add tests.yml"

This reverts commit ec12654.
  • Loading branch information
bogdankostic authored Jul 10, 2023
1 parent 206b218 commit 048fc7f
Showing 1 changed file with 68 additions and 6 deletions.
74 changes: 68 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ jobs:
with:
parallel-finished: true

integration-tests-elasticsearch:
name: Integration / Elasticsearch / ${{ matrix.os }}
integration-tests-elasticsearch7:
name: Integration / Elasticsearch7 / ${{ matrix.os }}
needs:
- unit-tests
strategy:
Expand All @@ -194,12 +194,10 @@ jobs:
runs-on: ${{ matrix.os }}
services:
elasticsearch:
image: elasticsearch:8.7.1
image: elasticsearch:7.17.6
env:
discovery.type: "single-node"
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xms128m -Xmx256m"
ELASTIC_CLIENT_APIVERSIONING: 1
ports:
- 9200:9200
steps:
Expand Down Expand Up @@ -247,6 +245,69 @@ jobs:
- "branch:${{ github.ref_name }}"
- "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
integration-tests-elasticsearch8:
name: Integration / Elasticsearch8 / ${{ matrix.os }}
needs:
- unit-tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
elasticsearch:
image: elasticsearch:8.8.0
env:
discovery.type: "single-node"
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xms128m -Xmx256m"
ports:
- 9200:9200
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Haystack
run: pip install .[elasticsearch8,dev,preprocessing,inference]

- name: Run tests
run: |
pytest --maxfail=5 -m "document_store and integration" test/document_stores/test_elasticsearch.py
- name: Calculate alert data
id: calculator
shell: bash
if: (success() || failure()) && github.ref_name == 'main'
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()) && github.ref_name == 'main'
uses: masci/datadog@v1
with:
api-key: ${{ secrets.CORE_DATADOG_API_KEY }}
api-url: https://api.datadoghq.eu
events: |
- title: "${{ github.workflow }} workflow"
text: "Job ${{ github.job }} in branch ${{ github.ref_name }}"
alert_type: "${{ steps.calculator.outputs.alert_type }}"
source_type_name: "Github"
host: ${{ github.repository_owner }}
tags:
- "project:${{ github.repository }}"
- "job:${{ github.job }}"
- "run_id:${{ github.run_id }}"
- "workflow:${{ github.workflow }}"
- "branch:${{ github.ref_name }}"
- "url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
integration-tests-sql:
name: Integration / SQL / ${{ matrix.os }}
needs:
Expand Down Expand Up @@ -761,7 +822,8 @@ jobs:
# This way we'll be able to mark only this test as required
# and skip it accordingly.
needs:
- integration-tests-elasticsearch
- integration-tests-elasticsearch7
- integration-tests-elasticsearch8
- integration-tests-sql
- integration-tests-opensearch
- integration-tests-dc
Expand Down

0 comments on commit 048fc7f

Please sign in to comment.