multiple changes to recall honestly #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: QueryPilot CICD | |
| on: | |
| push: | |
| branches: [ AI ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | |
| PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }} | |
| GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run syntax check | |
| run: python -m py_compile src/sql_mcp.py | |
| - name: Create data directories | |
| run: mkdir -p data/raw data/processed | |
| - name: Get vector store type from params.yaml | |
| id: get-vectorstore | |
| run: | | |
| VECTOR_STORE=$(python -c "import yaml; print(yaml.safe_load(open('params.yaml'))['vector_store']['type'])") | |
| echo "VECTOR_STORE=$VECTOR_STORE" >> $GITHUB_ENV | |
| - name: Conditionally build vector store | |
| run: | | |
| if [ "$VECTOR_STORE" != "pinecone" ]; then | |
| echo "Building vector store for $VECTOR_STORE..." | |
| python src/loading_data.py | |
| python src/build_vector_stores.py | |
| else | |
| echo "Skipping build_vector_stores.py because vector store is Pinecone" | |
| fi | |
| - name: Vector store connection | |
| run: | | |
| python src/retrieve_context.py | |
| echo "Vector store connected successfully" | |