vdb-tests.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 Store (TiDB)
  48. uses: hoverkraft-tech/compose-action@v2.0.2
  49. with:
  50. compose-file: docker/tidb/docker-compose.yaml
  51. services: |
  52. tidb
  53. tiflash
  54. - name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
  55. uses: hoverkraft-tech/compose-action@v2.0.2
  56. with:
  57. compose-file: |
  58. docker/docker-compose.yaml
  59. services: |
  60. weaviate
  61. qdrant
  62. couchbase-server
  63. etcd
  64. minio
  65. milvus-standalone
  66. pgvecto-rs
  67. pgvector
  68. opengauss
  69. chroma
  70. elasticsearch
  71. - name: Check TiDB Ready
  72. run: poetry run -P api python api/tests/integration_tests/vdb/tidb_vector/check_tiflash_ready.py
  73. - name: Test Vector Stores
  74. run: poetry run -P api bash dev/pytest/pytest_vdb.sh