-
Notifications
You must be signed in to change notification settings - Fork 117
123 lines (104 loc) · 3.45 KB
/
testing-install.yaml
File metadata and controls
123 lines (104 loc) · 3.45 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Installation Tests
on:
workflow_call:
workflow_dispatch:
permissions: {}
jobs:
install:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build sdist & wheel
run: python -m build --sdist --wheel
- name: Install from built artifacts
shell: bash
run: |
pip install dist/*.whl || pip install dist/*.tar.gz
- name: Verify import & version
run: |
python - <<EOF
import pinecone
print("Imported OK, version:", pinecone.__version__)
from pinecone import Pinecone
EOF
- name: Check a few basic functions
run: |
python - <<EOF
from pinecone import Pinecone
pc = Pinecone()
print("Indexes:", pc.list_indexes())
print("Collections:", pc.list_collections())
print("Backups:", pc.list_backups())
print("Assistants:", pc.assistant.list_assistants())
print("Inference Models:", pc.inference.list_models())
EOF
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ vars.PINECONE_ADDITIONAL_HEADERS }}
install-windows:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
fail-fast: true
matrix:
os: [windows-latest]
python: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build sdist & wheel
run: python -m build --sdist --wheel
- name: Install from built artifacts
shell: pwsh
run: |
$wheels = Get-ChildItem -Path "dist" -Filter "*.whl"
$sdists = Get-ChildItem -Path "dist" -Filter "*.tar.gz"
if ($wheels) {
pip install $wheels[0].FullName
}
elseif ($sdists) {
pip install $sdists[0].FullName
}
else {
throw "No wheel or sdist found in dist/"
}
- name: Verify import & version
shell: pwsh
run: |
python -c "import pinecone; print('Imported OK, version:', pinecone.__version__)"
- name: Check a few basic functions
shell: pwsh
run: |
python -c "
from pinecone import Pinecone
pc = Pinecone()
print('Indexes:', pc.list_indexes())
print('Collections:', pc.list_collections())
print('Backups:', pc.list_backups())
print('Assistants:', pc.assistant.list_assistants())
print('Inference Models:', pc.inference.list_models())
"
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ADDITIONAL_HEADERS: ${{ vars.PINECONE_ADDITIONAL_HEADERS }}