Added tests + docs + CI for Elasticsearch

This commit is contained in:
Enrico Zimuel 2025-10-31 18:18:27 +01:00
parent f1c8a200c8
commit 12f8d96f48
No known key found for this signature in database
GPG key ID: 6CB203F6934A69F1
9 changed files with 209 additions and 115 deletions

View file

@ -146,6 +146,14 @@ jobs:
docker logs weaviate
exit 1
- name: Setup Elasticsearch
if: matrix.vector-io-provider == 'remote::elasticsearch'
id: setup-elasticsearch
run: |
curl -fsSL https://elastic.co/start-local | sh -s -- -v 9.2.0 --esonly
source elastic-start-local/.env
echo "elasticsearch-api-key=$ES_LOCAL_API_KEY" >> "$GITHUB_OUTPUT"
- name: Build Llama Stack
run: |
uv run --no-sync llama stack list-deps ci-tests | xargs -L1 uv pip install
@ -170,6 +178,8 @@ jobs:
QDRANT_URL: ${{ matrix.vector-io-provider == 'remote::qdrant' && 'http://localhost:6333' || '' }}
ENABLE_WEAVIATE: ${{ matrix.vector-io-provider == 'remote::weaviate' && 'true' || '' }}
WEAVIATE_CLUSTER_URL: ${{ matrix.vector-io-provider == 'remote::weaviate' && 'localhost:8080' || '' }}
ELASTICSEARCH_URL: ${{ matrix.vector-io-provider == 'remote::elasticsearch' && 'http://localhost:9200' || '' }}
ELASTICSEARCH_API_KEY: ${{ matrix.vector-io-provider == 'remote::elasticsearch' && '${{ steps.setup-elasticsearch.outputs.elasticsearch-api-key }}' || '' }}
run: |
uv run --no-sync \
pytest -sv --stack-config="files=inline::localfs,inference=inline::sentence-transformers,vector_io=${{ matrix.vector-io-provider }}" \
@ -196,6 +206,11 @@ jobs:
run: |
docker logs qdrant > qdrant.log
- name: Write Elasticsearch logs to file
if: ${{ always() && matrix.vector-io-provider == 'remote::elasticsearch' }}
run: |
docker logs es-local-dev > elasticsearch.log
- name: Upload all logs to artifacts
if: ${{ always() }}
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0