ci: run pytest in all workflows — real unit job + Qdrant-backed integration job
- pr.yaml: new pytest job (unit tests only, integration deselected by marker) - main.yaml / cron.yaml / tag.yaml: replace the build-only 'test' job with a real pytest unit job + an integration-test job that starts a Qdrant container sharing the job container's network namespace (--network container:$(hostname) — bypasses the Gitea runner bug with service containers), waits for /healthz, runs 'pytest -m integration', then tears down. - build/build-push jobs now require [test, integration-test]; previously 'test' was only a docker build and pytest never ran in CI. - integration-test first cleans up any stale qdrant container (rerun-safe). - setup-python SHA aligned with docker-build.yaml (v7, python 3.13/3.14).
This commit is contained in:
1 parent
b9e22766c0
commit
de27820cc7
4 files changed
+173
-10
No files matched your search
@@ -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 }} .
|
||||
Reference in new issue
Block a user