Skip to content

fix: switch default test model to llama-3.1-8b-instant and add delay … #60

fix: switch default test model to llama-3.1-8b-instant and add delay …

fix: switch default test model to llama-3.1-8b-instant and add delay … #60

Workflow file for this run

name: Eval
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
eval:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: codex_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
working-directory: codex-backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run upload pipeline unit tests
working-directory: codex-backend
run: python -m unittest tests/test_upload_pipeline.py
env:
SUPABASE_URL: https://dummy-project.supabase.co
SUPABASE_ANON_KEY: dummy-anon-key
GROQ_API_KEY: dummy-key
DB_URL: postgresql+asyncpg://u:p@localhost/db
- name: Seed database schema
working-directory: codex-backend
run: |
python -c "
from sqlalchemy import create_engine, text
engine = create_engine('postgresql+psycopg://postgres:postgres@localhost:5432/codex_db')
with open('supabase/seed.sql') as f:
sql = f.read()
with engine.connect() as conn:
conn.execute(text(sql))
conn.commit()
print('Database seeded successfully')
"
- name: Run golden query test
working-directory: codex-backend
run: python tests/test_golden.py
env:
DB_URL: postgresql+psycopg://postgres:postgres@localhost:5432/codex_db
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
SUPABASE_URL: https://dummy-project.supabase.co
SUPABASE_ANON_KEY: dummy-anon-key
- name: Run rigorous sweep
working-directory: codex-backend
run: python tests/test_rigorous.py
env:
DB_URL: postgresql+psycopg://postgres:postgres@localhost:5432/codex_db
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
SUPABASE_URL: https://dummy-project.supabase.co
SUPABASE_ANON_KEY: dummy-anon-key
- name: Run RAGAS eval
working-directory: codex-backend
run: python eval/ragas_eval.py
continue-on-error: true
env:
DB_URL: postgresql+psycopg://postgres:postgres@localhost:5432/codex_db
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
SUPABASE_URL: https://dummy-project.supabase.co
SUPABASE_ANON_KEY: dummy-anon-key