Skip to content

Add Pinecone Local testing support in CI #308

Add Pinecone Local testing support in CI

Add Pinecone Local testing support in CI #308

Workflow file for this run

name: ci
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
pc-index-serverless:
image: ghcr.io/pinecone-io/pinecone-index:latest
ports:
- 5081:5081
env:
PORT: 5081
DIMENSION: 1536
METRIC: cosine
INDEX_TYPE: serverless
pc-index-pod:
image: ghcr.io/pinecone-io/pinecone-index:latest
ports:
- 5082:5082
env:
PORT: 5082
DIMENSION: 1536
METRIC: cosine
INDEX_TYPE: pod
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- name: Install dependencies
run: |
go get ./pinecone
- name: Run tests
run: go test -count=1 -v ./pinecone
env:
PINECONE_API_KEY: ${{ secrets.API_KEY }}
- name: Run local integration tests
run: go test -count =1 -v ./pinecone -tags=localServer
env:
PINECONE_INDEX_URL_POD: https://localhost:5081
PINECONE_INDEX_URL_SERVERLESS: https://localhost:5082
PINECONE_DIMENSION: 1536