chore: add integration tests with real Qdrant instance
- Integration tests for search_emails and read_email against live Qdrant - Indexes 3 test emails, tests search by content/participant/date - CI: new 'integration-test' job with qdrant service, runs before build - Unit test job ignores integration test file
This commit is contained in:
@@ -20,11 +20,33 @@ jobs:
|
||||
run: |
|
||||
pip install -r requirements.txt pytest
|
||||
- name: Run unit tests
|
||||
run: pytest tests/ -v
|
||||
run: pytest tests/ -v --ignore=tests/test_integration.py
|
||||
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
qdrant:
|
||||
image: docker.io/qdrant/qdrant:latest
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt pytest
|
||||
- name: Run integration tests
|
||||
run: pytest tests/test_integration.py -v
|
||||
env:
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test_mcp_maildir
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
needs: [test, integration-test]
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
|
||||
@@ -44,9 +66,6 @@ jobs:
|
||||
with:
|
||||
images: jcabillot/mcp-maildir
|
||||
tags: |
|
||||
#type=ref,event=branch
|
||||
#type=ref,event=pr
|
||||
#type=sha
|
||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: Build and push
|
||||
|
||||
Reference in New Issue
Block a user