You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repo has no .github/workflows/ directory — there is zero CI — despite having a real, offline-runnable pytest suite in tests/test_query.py (10 tests, mocks pinecone.Pinecone and google.genai.Client at import time, no network/API keys needed). Without a workflow, a dependency bump or code change can silently break query.py's request-shape assumptions with nothing catching it before merge.
Solution
Added .github/workflows/ci.yml:
Triggers on push and pull_request.
Least-privilege permissions: contents: read.
Installs from requirements.txt plus pytest, then runs pytest tests/test_query.py only — tests/test_live.py is intentionally excluded, since its own docstring documents it as requiring live credentials and not being run in CI.
Scoped narrowly per the issue: no linting/formatting, no coverage gates, no build/release pipeline, and test_live.py is not wired up.
Verification
Ran the exact command the workflow uses, from a clean virtualenv built only from requirements.txt + pytest (no PINECONE_API_KEY/GOOGLE_API_KEY set):
$ pytest tests/test_query.py -v
...
10 passed in 0.18s
All 10 mocked unit tests pass, confirming the workflow's install + test steps work end to end. Also validated ci.yml parses as well-formed YAML.
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 30699406529 -n agent -D /tmp/agent-30699406529
# Fetch the bundle into a temporary ref, then update the local branch
git fetch /tmp/agent-30699406529/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-a4bf97399a729a16-dec869bf
git update-ref refs/heads/agent/maintenance/issue-11-a4bf97399a729a16 refs/bundles/create-pr-agent-maintenance-issue-11-a4bf97399a729a16-dec869bf
git checkout agent/maintenance/issue-11-a4bf97399a729a16
# 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-a4bf97399a729a16-dec869bf
# Push the branch to origin
git push origin agent/maintenance/issue-11-a4bf97399a729a16
# Create the pull request
gh pr create --title 'ci: add workflow to run offline unit tests on push/PR' --base main --head agent/maintenance/issue-11-a4bf97399a729a16 --repo pinecone-io/bird-search-example
Problem
The repo has no
.github/workflows/directory — there is zero CI — despite having a real, offline-runnable pytest suite intests/test_query.py(10 tests, mockspinecone.Pineconeandgoogle.genai.Clientat import time, no network/API keys needed). Without a workflow, a dependency bump or code change can silently breakquery.py's request-shape assumptions with nothing catching it before merge.Solution
Added
.github/workflows/ci.yml:pushandpull_request.permissions: contents: read.requirements.txtpluspytest, then runspytest tests/test_query.pyonly —tests/test_live.pyis intentionally excluded, since its own docstring documents it as requiring live credentials and not being run in CI.Scoped narrowly per the issue: no linting/formatting, no coverage gates, no build/release pipeline, and
test_live.pyis not wired up.Verification
Ran the exact command the workflow uses, from a clean virtualenv built only from
requirements.txt+pytest(noPINECONE_API_KEY/GOOGLE_API_KEYset):All 10 mocked unit tests pass, confirming the workflow's install + test steps work end to end. Also validated
ci.ymlparses as well-formed YAML.Follow-ups
Out of scope here, tracked separately:
pytest tests/fails entirely on a clean checkout without API keys, contradicting conftest.py's documented behavior #12 —pytest tests/(the full directory, not justtest_query.py) still fails at collection time without API keys; this PR only wires uptest_query.pyper the issue's explicit scope, so it isn't affected by that bug.requirements.txt.Closes #11
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
agentartifact in the workflow run linked above.To create a pull request with the changes: