feat(ci): add PR workflow with tests + integration tests
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
name: PR Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- uses: actions/setup-python@a309ff8b426b258ec0a6e2f7b8a30f9f6689405 # v6
|
||||||
|
with:
|
||||||
|
python-version: "3.14"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install -r requirements.txt pytest
|
||||||
|
- name: Run unit tests
|
||||||
|
run: python -m pytest tests/ -v --ignore=tests/test_integration.py
|
||||||
|
|
||||||
|
integration-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
- name: Start Qdrant
|
||||||
|
run: docker run -d --name qdrant --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
|
||||||
|
- uses: actions/setup-python@a309ff8b426b258ec0a6e2f7b8a30f9f6689405 # v6
|
||||||
|
with:
|
||||||
|
python-version: "3.14"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install -r requirements.txt pytest
|
||||||
|
- name: Run integration tests
|
||||||
|
run: python -m pytest tests/test_integration.py -v
|
||||||
|
env:
|
||||||
|
QDRANT_URL: http://localhost:6333
|
||||||
|
COLLECTION_NAME: test_mcp_maildir
|
||||||
Reference in New Issue
Block a user