Skip to content

add graphrag to ui #302

add graphrag to ui

add graphrag to ui #302

name: Run Pytest before merging to main
on:
pull_request:
branches:
- main
- dev
- cloud-main
- cloud-dev
jobs:
test:
runs-on: [ self-hosted, dind ]
services:
milvus:
image: milvusdb/milvus:latest
ports:
- 19530:19530
- 19121:19121
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11.8'
- name: Install and Check Python Setup
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r copilot/requirements.txt
pip install pytest
- name: Create db config
run: |
mkdir configs
echo "$DB_CONFIG" > configs/db_config.json
echo "$LLM_CONFIG_OPENAI_GPT4" > configs/llm_config.json
echo "$LLM_CONFIG_OPENAI_GPT4" > configs/openai_gpt4_config.json
echo "$LLM_CONFIG_AZURE_GPT35" > configs/azure_llm_config.json
echo "$LLM_CONFIG_OPENAI_GPT35" > configs/openai_gpt3.5-turbo_config.json
echo "$LLM_CONFIG_GCP_TEXT_BISON" > configs/gcp_text-bison_config.json
echo "$GCP_CREDS_CONFIG" > configs/GCP_CREDS.json
echo "$LLM_TEST_EVALUATOR" > configs/test_evaluation_model_config.json
echo "$LLM_CONFIG_BEDROCK_CLAUDE3" > configs/bedrock_config.json
echo "$MILVUS_CONFIG" > configs/milvus_config.json
env:
DB_CONFIG: ${{ secrets.DB_CONFIG }}
LLM_CONFIG: ${{ secrets.LLM_CONFIG_OPENAI_GPT4 }}
LLM_CONFIG_OPENAI_GPT4: ${{ secrets.LLM_CONFIG_OPENAI_GPT4 }}
LLM_CONFIG_AZURE_GPT35: ${{ secrets.LLM_CONFIG_AZURE_GPT35 }}
LLM_CONFIG_GCP_TEXT_BISON: ${{ secrets.LLM_CONFIG_GCP_TEXT_BISON }}
LLM_CONFIG_OPENAI_GPT35: ${{ secrets.LLM_CONFIG_OPENAI_GPT35 }}
LLM_CONFIG_BEDROCK_CLAUDE3: ${{ secrets.LLM_CONFIG_BEDROCK_CLAUDE3 }}
GCP_CREDS_CONFIG: ${{ secrets.GCP_CREDS_CONFIG }}
LLM_TEST_EVALUATOR: ${{ secrets.LLM_TEST_EVALUATOR }}
MILVUS_CONFIG: ${{ secrets.MILVUS_CONFIG }}
- name: Run pytest
run: |
source venv/bin/activate
cp -r copilot/tests/*test* copilot/tests/create_wandb_report.py copilot/app/
cd copilot/app
python -m pytest --disable-warnings
env:
DB_CONFIG: ${{ secrets.DB_CONFIG }}
LLM_CONFIG: ${{ secrets.LLM_CONFIG_OPENAI_GPT4 }}
LLM_CONFIG_OPENAI_GPT4: ${{ secrets.LLM_CONFIG_OPENAI_GPT4 }}
LLM_CONFIG_AZURE_GPT35: ${{ secrets.LLM_CONFIG_AZURE_GPT35 }}
LLM_CONFIG_GCP_TEXT_BISON: ${{ secrets.LLM_CONFIG_GCP_TEXT_BISON }}
LLM_CONFIG_OPENAI_GPT35: ${{ secrets.LLM_CONFIG_OPENAI_GPT35 }}
LLM_CONFIG_BEDROCK_CLAUDE3: ${{ secrets.LLM_CONFIG_BEDROCK_CLAUDE3 }}
GCP_CREDS_CONFIG: ${{ secrets.GCP_CREDS_CONFIG }}
LLM_TEST_EVALUATOR: ${{ secrets.LLM_TEST_EVALUATOR }}
MILVUS_CONFIG: ${{ secrets.MILVUS_CONFIG }}
PYTHONPATH: /opt/actions-runner/_work/CoPilot/CoPilot:/opt/actions-runner/_work/CoPilot/CoPilot/tests:/opt/actions-runner/_work/CoPilot/CoPilot/tests/app:/opt/actions-runner/_work/_tool/Python/3.11.8/x64/lib/python3.11/site-packages