vdb-tests.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.10"
  21. - "3.11"
  22. - "3.12"
  23. steps:
  24. - name: Checkout code
  25. uses: actions/checkout@v4
  26. - name: Setup Poetry and Python ${{ matrix.python-version }}
  27. uses: ./.github/actions/setup-poetry
  28. with:
  29. python-version: ${{ matrix.python-version }}
  30. poetry-lockfile: api/poetry.lock
  31. - name: Check Poetry lockfile
  32. run: |
  33. poetry check -C api --lock
  34. poetry show -C api
  35. - name: Install dependencies
  36. run: poetry install -C api --with dev
  37. - name: Set up dotenvs
  38. run: |
  39. cp docker/.env.example docker/.env
  40. cp docker/middleware.env.example docker/middleware.env
  41. - name: Expose Service Ports
  42. run: sh .github/workflows/expose_service_ports.sh
  43. - name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
  44. uses: hoverkraft-tech/compose-action@v2.0.2
  45. with:
  46. compose-file: |
  47. docker/docker-compose.yaml
  48. services: |
  49. weaviate
  50. qdrant
  51. couchbase-server
  52. etcd
  53. minio
  54. milvus-standalone
  55. pgvecto-rs
  56. pgvector
  57. chroma
  58. elasticsearch
  59. - name: Test Vector Stores
  60. run: poetry run -C api bash dev/pytest/pytest_vdb.sh