forked from pinecone-io/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 2.03 KB
/
Copy pathtesting-unit.yaml
File metadata and controls
70 lines (66 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "Unit Tests"
'on':
workflow_call:
inputs:
python_versions_json:
required: true
type: string
permissions: {}
jobs:
type-checking:
name: Type checking
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ${{ fromJson(inputs.python_versions_json) }}
use_grpc:
- true
- false
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: '${{ matrix.use_grpc }}'
include_types: true
include_asyncio: true
python_version: '${{ matrix.python-version }}'
- name: mypy check
run: poetry run mypy pinecone
unit-tests:
name: Unit (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ${{ fromJson(inputs.python_versions_json) }}
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: false
include_types: false
include_asyncio: true
python_version: '${{ matrix.python-version }}'
- name: Run unit tests (REST)
run: poetry run pytest --cov=pinecone --timeout=120 tests/unit --retries 2 --retry-delay 35 -s -vv --log-cli-level=DEBUG
grpc-unit-tests:
name: Unit grpc (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ${{ fromJson(inputs.python_versions_json) }}
steps:
- uses: actions/checkout@v4
- name: Setup Poetry
uses: ./.github/actions/setup-poetry
with:
include_grpc: true
include_types: false
include_asyncio: true
python_version: '${{ matrix.python-version }}'
- name: Run unit tests (GRPC)
run: poetry run pytest --cov=pinecone/grpc --timeout=120 tests/unit_grpc --retries 2 --retry-delay 35 -s -vv --log-cli-level=DEBUG