Skip to content

Commit

Permalink
ci: check v8 tests failing
Browse files Browse the repository at this point in the history
Signed-off-by: Joan Martinez <joan.fontanals.martinez@jina.ai>
  • Loading branch information
JoanFM committed Feb 12, 2024
1 parent aa15b9e commit 991f403
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ jobs:
- name: Test
id: test
run: |
poetry run pytest -m 'index and not elasticv8' --cov=docarray --cov-report=xml tests/index/${{ matrix.db_test_folder }}
poetry run pytest -m 'index and not elasticv8' -s -v --cov=docarray --cov-report=xml tests/index/${{ matrix.db_test_folder }}
echo "flag it as docarray for codeoverage"
echo "codecov_flag=docarray" >> $GITHUB_OUTPUT
timeout-minutes: 30
Expand All @@ -242,7 +242,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: [3.10]
pydantic-version: ["pydantic-v2", "pydantic-v1"]
steps:
- uses: actions/checkout@v2.5.0
Expand All @@ -267,7 +267,7 @@ jobs:
- name: Test
id: test
run: |
poetry run pytest -m 'index and elasticv8' --cov=docarray --cov-report=xml tests
poetry run pytest -m 'index and elasticv8' -s -v --cov=docarray --cov-report=xml tests
echo "flag it as docarray for codeoverage"
echo "codecov_flag=docarray" >> $GITHUB_OUTPUT
timeout-minutes: 30
Expand Down
5 changes: 5 additions & 0 deletions tests/index/elastic/v8/test_find.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

@pytest.mark.parametrize('similarity', ['cosine', 'l2_norm', 'dot_product'])
def test_find_simple_schema(similarity, tmp_index_name): # noqa: F811
from elasticsearch import Elasticsearch

es = Elasticsearch(hosts='http://localhost:9200/')
ping = es.ping()
print(f'PING WORKED? {ping}')
class SimpleSchema(BaseDoc):
tens: NdArray[10] = Field(similarity=similarity)

Expand Down
5 changes: 5 additions & 0 deletions tests/index/elastic/v8/test_index_get_del.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
def test_index_simple_schema(
ten_simple_docs, use_docarray, tmp_index_name # noqa: F811
):
from elasticsearch import Elasticsearch

es = Elasticsearch(hosts='http://localhost:9200/')
ping = es.ping()
print(f'PING WORKED? {ping}')
index = ElasticDocIndex[SimpleDoc](index_name=tmp_index_name)
if use_docarray:
ten_simple_docs = DocList[SimpleDoc](ten_simple_docs)
Expand Down

0 comments on commit 991f403

Please sign in to comment.