vdb-tests.yml 1.9 KB

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