CI/CD with Pinecone Local and GitHub Actions
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 SDKv3.0.x
or later, and Go SDKv1.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:
- Pull the Pinecone Local Docker image.
- Start a Pinecone Local instance for each test run.
- Execute tests against the local instance.
- Tear down the instance after tests complete.
Here’s a sample GitHub Actions workflow that you can extend for your own needs:
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.
Was this page helpful?