Skip to content

Commit e4fc021

Browse files
committed
ci: add GitHub Secrets to workflow for integration tests
Fixes #10 Problem: Backend integration tests require real API credentials (Supabase, OpenAI, Pinecone) but CI/CD environment had no access to these, causing 5 test failures with 'Supabase credentials not configured' errors. Solution: Add GitHub Secrets to CI workflow env variables for pytest execution. Secrets added: - SUPABASE_URL: Supabase project endpoint - SUPABASE_ANON_KEY: Supabase anonymous key for auth - SUPABASE_JWT_SECRET: JWT secret for token verification - OPENAI_API_KEY: OpenAI API for embeddings - PINECONE_API_KEY: Pinecone for vector search - PINECONE_INDEX_NAME: Test index name Benefits: ✅ Integration tests run against real Supabase instance ✅ JWT authentication flow validated in CI/CD ✅ API endpoint security verified with actual credentials ✅ Better test coverage than mocking ✅ Catches real integration issues before deployment Note: Secrets must be added in repository settings by maintainer: Settings → Secrets and variables → Actions → New repository secret
1 parent 1451fc7 commit e4fc021

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
env:
3333
DEBUG: "true"
3434
API_KEY: "test-secret-key"
35+
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
36+
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
37+
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
38+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39+
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
40+
PINECONE_INDEX_NAME: "codeintel-test"
3541
run: |
3642
pytest tests/ -v --cov=services --cov-report=term-missing
3743

0 commit comments

Comments
 (0)