vdb-tests.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. name: Run VDB Tests
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. paths:
  7. - api/core/rag/datasource/**
  8. - docker/**
  9. - .github/workflows/vdb-tests.yml
  10. concurrency:
  11. group: vdb-tests-${{ github.head_ref || github.run_id }}
  12. cancel-in-progress: true
  13. jobs:
  14. test:
  15. name: VDB Tests
  16. runs-on: ubuntu-latest
  17. strategy:
  18. matrix:
  19. python-version:
  20. - "3.11"
  21. - "3.12"
  22. steps:
  23. - name: Checkout code
  24. uses: actions/checkout@v4
  25. - name: Setup Poetry and Python ${{ matrix.python-version }}
  26. uses: ./.github/actions/setup-poetry
  27. with:
  28. python-version: ${{ matrix.python-version }}
  29. poetry-lockfile: api/poetry.lock
  30. - name: Check Poetry lockfile
  31. run: |
  32. poetry check -C api --lock
  33. poetry show -C api
  34. - name: Install dependencies
  35. run: poetry install -C api --with dev
  36. - name: Set up dotenvs
  37. run: |
  38. cp docker/.env.example docker/.env
  39. cp docker/middleware.env.example docker/middleware.env
  40. - name: Expose Service Ports
  41. run: sh .github/workflows/expose_service_ports.sh
  42. - name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
  43. uses: hoverkraft-tech/compose-action@v2.0.2
  44. with:
  45. compose-file: |
  46. docker/docker-compose.yaml
  47. services: |
  48. weaviate
  49. qdrant
  50. couchbase-server
  51. etcd
  52. minio
  53. milvus-standalone
  54. pgvecto-rs
  55. pgvector
  56. chroma
  57. elasticsearch
  58. - name: Test Vector Stores
  59. run: poetry run -C api bash dev/pytest/pytest_vdb.sh