-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.48 KB
/
Copy pathci.yaml
File metadata and controls
55 lines (44 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: QueryPilot CICD
on:
push:
branches: [ main ]
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"