Merge pull request 'test: run pytest in CI — real unit job + Qdrant-backed integration job' (#52) from tests/ci-pytest into main
Main Release / hadolint (push) Successful in 2m18s
Docker Build and Push / test (push) Successful in 4m50s
Main Release / test (push) Successful in 4m38s
Docker Build and Push / integration-test (push) Successful in 5m19s
Main Release / integration-test (push) Successful in 3m14s
Renovate / renovate (push) Successful in 2m25s
Docker Build and Push / build (push) Successful in 3m51s
Main Release / build (push) Successful in 4m8s
Main Release / tag (push) Successful in 52s
Tag Release / hadolint (push) Successful in 30s
Tag Release / test (push) Successful in 2m25s
Tag Release / integration-test (push) Successful in 2m38s
Tag Release / build-push (push) Successful in 3m9s
Main Release / hadolint (push) Successful in 2m18s
Docker Build and Push / test (push) Successful in 4m50s
Main Release / test (push) Successful in 4m38s
Docker Build and Push / integration-test (push) Successful in 5m19s
Main Release / integration-test (push) Successful in 3m14s
Renovate / renovate (push) Successful in 2m25s
Docker Build and Push / build (push) Successful in 3m51s
Main Release / build (push) Successful in 4m8s
Main Release / tag (push) Successful in 52s
Tag Release / hadolint (push) Successful in 30s
Tag Release / test (push) Successful in 2m25s
Tag Release / integration-test (push) Successful in 2m38s
Tag Release / build-push (push) Successful in 3m9s
Reviewed-on: #52
This commit was merged in pull request #52.
This commit is contained in:
commit
916850b692
11 files changed
+530
-34
No files matched your search
@@ -18,11 +18,60 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run unit tests
|
||||
run: pytest tests/ -v
|
||||
env:
|
||||
# indexer/server read env at import; unit tests need no real backend
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test
|
||||
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
- name: Cleanup old Qdrant container
|
||||
run: |
|
||||
docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
||||
|
||||
- name: Start Qdrant
|
||||
run: |
|
||||
docker run -d --name qdrant-${{ github.run_id }} \
|
||||
--network "container:$(hostname)" \
|
||||
docker.io/qdrant/qdrant:latest
|
||||
|
||||
- name: Wait for Qdrant
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
curl -s http://localhost:6333/healthz \
|
||||
&& echo "QDRANT ready" && break
|
||||
echo "Waiting for Qdrant... ($i/30)"
|
||||
sleep 1
|
||||
done
|
||||
curl -s http://localhost:6333/healthz > /dev/null
|
||||
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run integration tests
|
||||
run: pytest tests/ -v -m integration
|
||||
env:
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test_mcp_maildir
|
||||
|
||||
- name: Cleanup Qdrant
|
||||
if: always()
|
||||
run: docker rm -f qdrant-${{ github.run_id }} || true
|
||||
|
||||
build-push:
|
||||
needs: [test]
|
||||
needs: [test, integration-test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
@@ -29,8 +29,8 @@ jobs:
|
||||
|
||||
- name: Start Qdrant
|
||||
run: |
|
||||
docker rm -f qdrant 2>/dev/null || true
|
||||
docker run -d --name qdrant \
|
||||
docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
||||
docker run -d --name qdrant-${{ github.run_id }} \
|
||||
--network "container:$(hostname)" \
|
||||
docker.io/qdrant/qdrant:latest
|
||||
|
||||
@@ -49,14 +49,14 @@ jobs:
|
||||
run: |
|
||||
pip install -r requirements.txt pytest
|
||||
- name: Run integration tests
|
||||
run: pytest tests/test_integration.py -v
|
||||
run: pytest tests/ -v -m integration
|
||||
env:
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test_mcp_maildir
|
||||
|
||||
- name: Cleanup Qdrant
|
||||
if: always()
|
||||
run: docker rm -f qdrant 2>/dev/null || true
|
||||
run: docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -18,11 +18,60 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run unit tests
|
||||
run: pytest tests/ -v
|
||||
env:
|
||||
# indexer/server read env at import; unit tests need no real backend
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test
|
||||
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
- name: Cleanup old Qdrant container
|
||||
run: |
|
||||
docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
||||
|
||||
- name: Start Qdrant
|
||||
run: |
|
||||
docker run -d --name qdrant-${{ github.run_id }} \
|
||||
--network "container:$(hostname)" \
|
||||
docker.io/qdrant/qdrant:latest
|
||||
|
||||
- name: Wait for Qdrant
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
curl -s http://localhost:6333/healthz \
|
||||
&& echo "QDRANT ready" && break
|
||||
echo "Waiting for Qdrant... ($i/30)"
|
||||
sleep 1
|
||||
done
|
||||
curl -s http://localhost:6333/healthz > /dev/null
|
||||
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run integration tests
|
||||
run: pytest tests/ -v -m integration
|
||||
env:
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test_mcp_maildir
|
||||
|
||||
- name: Cleanup Qdrant
|
||||
if: always()
|
||||
run: docker rm -f qdrant-${{ github.run_id }} || true
|
||||
|
||||
build:
|
||||
needs: [test]
|
||||
needs: [test, integration-test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
@@ -14,9 +14,25 @@ jobs:
|
||||
with:
|
||||
dockerfile: pkg/Dockerfile
|
||||
|
||||
pytest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run unit tests
|
||||
run: pytest tests/ -v
|
||||
env:
|
||||
# indexer/server read env at import; unit tests need no real backend
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test
|
||||
|
||||
build-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||
@@ -18,11 +18,60 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
|
||||
- run: docker build -f pkg/Dockerfile -t ci-image:${{ github.sha }} .
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run unit tests
|
||||
run: pytest tests/ -v
|
||||
env:
|
||||
# indexer/server read env at import; unit tests need no real backend
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test
|
||||
|
||||
integration-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
- name: Cleanup old Qdrant container
|
||||
run: |
|
||||
docker rm -f qdrant-${{ github.run_id }} 2>/dev/null || true
|
||||
|
||||
- name: Start Qdrant
|
||||
run: |
|
||||
docker run -d --name qdrant-${{ github.run_id }} \
|
||||
--network "container:$(hostname)" \
|
||||
docker.io/qdrant/qdrant:latest
|
||||
|
||||
- name: Wait for Qdrant
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
curl -s http://localhost:6333/healthz \
|
||||
&& echo "QDRANT ready" && break
|
||||
echo "Waiting for Qdrant... ($i/30)"
|
||||
sleep 1
|
||||
done
|
||||
curl -s http://localhost:6333/healthz > /dev/null
|
||||
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt pytest
|
||||
- name: Run integration tests
|
||||
run: pytest tests/ -v -m integration
|
||||
env:
|
||||
QDRANT_URL: http://localhost:6333
|
||||
COLLECTION_NAME: test_mcp_maildir
|
||||
|
||||
- name: Cleanup Qdrant
|
||||
if: always()
|
||||
run: docker rm -f qdrant-${{ github.run_id }} || true
|
||||
|
||||
build-push:
|
||||
needs: [test]
|
||||
needs: [test, integration-test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
Reference in new issue
Block a user