-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (66 loc) · 1.91 KB
/
ai-sql-analyst-ci.yml
File metadata and controls
81 lines (66 loc) · 1.91 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: AI SQL Analyst CI
on:
push:
paths:
- "ai-sql-analyst/**"
- ".github/workflows/ai-sql-analyst-ci.yml"
pull_request:
paths:
- "ai-sql-analyst/**"
- ".github/workflows/ai-sql-analyst-ci.yml"
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ai-sql-analyst
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests
run: pytest tests -q
- name: Run text-to-SQL evals
run: python manage.py evals
postgres-integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: ai_sql_analyst
POSTGRES_USER: ai_sql
POSTGRES_PASSWORD: ai_sql_password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U ai_sql -d ai_sql_analyst"
--health-interval 5s
--health-timeout 5s
--health-retries 10
defaults:
run:
working-directory: ai-sql-analyst
env:
AI_SQL_ANALYST_DATABASE_BACKEND: postgres
AI_SQL_ANALYST_POSTGRES_DSN: postgresql://ai_sql:ai_sql_password@localhost:5432/ai_sql_analyst
AI_SQL_ANALYST_API_KEYS: dev-api-key
AI_SQL_ANALYST_BROWSER_API_KEY: dev-api-key
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Initialize Postgres schema
run: python manage.py init-db
- name: Run evals against Postgres
run: python manage.py evals