Pinecone Local is an in-memory Pinecone Database emulator available as a Docker image.

This page shows you how to build a CI/CD workflow with Pinecone Local and GitHub Actions to test your integration without connecting to your Pinecone account, affecting production data, or incurring any usage or storage fees.

Pinecone Local is not suitable for production. See Limitations for details.

This feature is in public preview.

Limitations

Pinecone Local has the following limitations:

  • Pinecone Local is available only as a Docker image.
  • Pinecone Local is an in-memory emulator and is not suitable for production. Records loaded into Pinecone Local do not persist after it is stopped.
  • Pinecone Local does not authenticate client requests. API keys are ignored.
  • Max number of records per index: 100,000.

Pinecone Local does not currently support the following features:

1. Write your tests

Running code against Pinecone Local is just like running code against your Pinecone account, with the following differences:

  • Pinecone Local does not authenticate client requests. API keys are ignored.

  • Pinecone Local requires Python SDK v4.1.2 or later, Node.js SDK v3.0.x or later, and Go SDK v1.1.1 or later. The Java SDK and .NET SDK are not yet supported.

Be sure to review the limitations of Pinecone Local before using it for development or testing.

Example

The following example assumes that you have started Pinecone Local without indexes:

2. Set up GitHub Actions

Set up a GitHub Actions workflow to do the following:

  1. Pull the Pinecone Local Docker image.
  2. Start a Pinecone Local instance for each test run.
  3. Execute tests against the local instance.
  4. Tear down the instance after tests complete.

Here’s a sample GitHub Actions workflow that you can extend for your own needs:

name: CI/CD with Pinecone Local
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  pc-local-tests:
    name: Pinecone Local tests
    runs-on: ubuntu-latest
    services:
      pc-local:
        image: ghcr.io/pinecone-io/pinecone-local:latest
        env:
          PORT: 5080
        ports:
          - "5080-6000:5080-6000"
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install "pinecone[grpc]"

      - name: Run tests
        run: |
          pytest test/

3. Run your tests

GitHub Actions will automaticaly run your tests against Pinecone Local when the events you specified in your workflow occur.

For a list of the events that can trigger a workflow and more details about using GitHub Actions for CI/CD, see the GitHub Actions documentation.