feat: add knowledge_brain #4147
Workflow file for this run
This file contains 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: Run Tests API and Worker | |
on: | |
pull_request: | |
paths: | |
- "backend/**" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: poetry | |
- name: Install Supabase CLI | |
run: | | |
ARCHITECTURE=$(uname -m) | |
if [ "$ARCHITECTURE" = "x86_64" ]; then | |
wget https://github.com/supabase/cli/releases/download/v1.163.6/supabase_1.163.6_linux_amd64.deb | |
sudo dpkg -i supabase_1.163.6_linux_amd64.deb | |
elif [ "$ARCHITECTURE" = "aarch64" ]; then | |
wget https://github.com/supabase/cli/releases/download/v1.163.6/supabase_1.163.6_linux_arm64.deb | |
sudo dpkg -i supabase_1.163.6_linux_arm64.deb | |
fi | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libmagic-dev poppler-utils libreoffice tesseract-ocr pandoc | |
- name: Install dependencies and run tests | |
env: | |
OPENAI_API_KEY: this-is-a-fake-openai-api-key | |
SUPABASE_URL: http://localhost:54321 | |
SUPABASE_SERVICE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU | |
PG_DATABASE_URL: postgresql://postgres:postgres@localhost:54322/postgres | |
PG_DATABASE_ASYNC_URL: postgresql+asyncpg://postgres:postgres@localhost:54322/postgres | |
ANTHROPIC_API_KEY: null | |
JWT_SECRET_KEY: super-secret-jwt-token-with-at-least-32-characters-long | |
AUTHENTICATE: true | |
TELEMETRY_ENABLED: true | |
CELERY_BROKER_URL: redis://redis:6379/0 | |
CELEBRY_BROKER_QUEUE_NAME: quivr-preview.fifo | |
QUIVR_DOMAIN: http://localhost:3000/ | |
BACKEND_URL: http://localhost:5050 | |
run: | | |
tesseract --version | |
cd backend | |
poetry install --with dev,test | |
supabase db start | |
poetry run pytest worker | |
poetry run pytest api |