Skip to content

chore: add CI workflow for offline test suite #21

Description

@pinecone-groundskeeper

Problem

There is no .github/workflows/ in this repo — zero CI — despite a real, offline-runnable pytest suite (tests/test_query.py) that mocks pinecone.Pinecone and google.genai.Client at import time and needs no network access or API keys. Without CI, a dependency bump or code change can silently break query.py's request-shape assumptions with nothing catching it before merge.

Solution

Add .github/workflows/ci.yml, triggered on push and pull_request, that:

  • installs from requirements.txt plus pytest
  • runs pytest tests/test_query.py only (not test_live.py, which hits the real Pinecone/Gemini index and requires live credentials this repo does not provision for CI — it is explicitly documented as excluded from CI in its own docstring)
  • declares an explicit least-privilege permissions: contents: read

Verification

Ran the target suite locally offline (no PINECONE_API_KEY/GOOGLE_API_KEY set): pytest tests/test_query.py -v → all 10 tests pass. The workflow mirrors this exact command, so the same clean-checkout run that passes locally will pass in CI, and a future assertion-breaking change will fail the job.

Follow-ups

Not in scope here (each is a separate, existing or potential issue):

Closes #11

Generated by GitHub Maintenance Fixer · sonnet50 · 87.5 AIC · ⌖ 19 AIC · ⊞ 8.1K · ◷


Note

This was originally intended as a pull request, but the git push operation failed.

Original error: The process '/usr/bin/git' failed with exit code 128

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 30909654254 -n agent -D /tmp/agent-30909654254

# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-30909654254/aw-pinecone-io-bird-search-example-agent-maintenance-issue-11.bundle refs/heads/agent/maintenance/issue-11:refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14
git update-ref refs/heads/agent/maintenance/issue-11-ff22a3db3c95bdaa refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14
git checkout agent/maintenance/issue-11-ff22a3db3c95bdaa
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d refs/bundles/create-pr-agent-maintenance-issue-11-ff22a3db3c95bdaa-df8a0c14

# Push the branch to origin
git push origin agent/maintenance/issue-11-ff22a3db3c95bdaa

# Create the pull request
gh pr create --title 'chore: add CI workflow for offline test suite' --base main --head agent/maintenance/issue-11-ff22a3db3c95bdaa --repo pinecone-io/bird-search-example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:maintenanceOpened/maintained by the maintenance agent; it recognizes its own work by this labelagentic-workflows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions