Skip to content

Commit

Permalink
Add coverage in data plane integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Feb 21, 2024
1 parent c50dc75 commit 69b9dfc
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/actions/test-data-plane/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
PINECONE_API_KEY:
description: 'The Pinecone API key'
required: true
python_version:
description: 'The version of Python to use'
required: false
default: '3.9'

outputs:
index_name:
Expand All @@ -37,7 +41,7 @@ runs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{ inputs.python_version }}

- name: Setup Poetry
uses: ./.github/actions/setup-poetry
Expand Down
41 changes: 40 additions & 1 deletion .github/workflows/testing-dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,45 @@ jobs:
INDEX_NAME: ${{ needs.dependency-matrix-setup.outputs.index_name }}

dependency-matrix-rest:
name: Deps (REST)
runs-on: ubuntu-latest
needs: dependency-matrix-setup
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version:
- 3.8
- 3.11
urllib3-version:
- 1.26.0
- 1.26.18
- 2.0.2
- 2.2.1
steps:
- uses: actions/checkout@v4
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: false
include_types: false
- name: 'Install urllib3 ${{ matrix.urllib3-version }}'
run: 'poetry add urllib3==${{ matrix.urllib3-version }}'
- uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: poetry run pytest tests/dependency/rest -s -v
env:
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
INDEX_NAME: '${{ needs.dependency-matrix-setup.outputs.index_name }}'

dependency-matrix-rest-312:
name: Deps (REST)
runs-on: ubuntu-latest
needs: dependency-matrix-setup
Expand All @@ -158,7 +197,7 @@ jobs:
- 1.26.5
- 1.26.18
- 2.0.2
- 2.1.0
- 2.2.1
steps:
- uses: actions/checkout@v4
- name: 'Set up Python ${{ matrix.python-version }}'
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/testing-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.8, 3.12]
use_grpc: [true, false]
metric:
- cosine
Expand All @@ -20,6 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-data-plane
with:
python-version: '${{ matrix.python_version }}'
use_grpc: '${{ matrix.use_grpc }}'
metric: '${{ matrix.metric }}'
spec: '${{ matrix.spec }}'
Expand Down Expand Up @@ -88,9 +90,6 @@ jobs:
DIMENSION: 1536
METRIC: 'cosine'




control-rest-serverless:
name: control plane serverless
runs-on: ubuntu-latest
Expand All @@ -102,7 +101,7 @@ jobs:
- python-version: 3.8 # Do one test run with 3.8 for sanity check
pod: { environment: 'us-east1-gcp'}
serverless: { cloud: 'aws', region: 'us-west-2'}
- python-version: 3.11
- python-version: 3.12
pod: { environment: 'us-east1-gcp'}
serverless: { cloud: 'aws', region: 'us-west-2'}
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ tqdm = ">=4.64.1"
# compatibility with libraries that may pin version.
certifi = ">=2019.11.17"
grpcio = [
{ version = ">=1.44.0", optional = true, python = "^3.8,<3.12" },
{ version = "^1.59.0", optional = true, python = "^3.12" }
{ version = ">=1.44.0", optional = true, python = "^3.8,<3.11" },
{ version = "^1.59.0", optional = true, python = "^3.11" }
]
grpc-gateway-protoc-gen-openapiv2 = { version = "0.1.0", optional = true }
googleapis-common-protos = { version = ">=1.53.0", optional = true }
Expand Down

0 comments on commit 69b9dfc

Please sign in to comment.