vdb-tests.yml 1.8 KB

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