-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (76 loc) · 2.42 KB
/
Copy pathci.yml
File metadata and controls
96 lines (76 loc) · 2.42 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.8.23"
- name: Set up Python
run: uv python install 3.13
- name: Sync dependencies
run: uv sync --extra dev
- name: Ruff check
run: uv run ruff check src tests scripts app
- name: Ruff format check
run: uv run ruff format --check src tests scripts app
- name: Mypy strict
run: uv run mypy src app scripts
- name: Pytest
run: uv run pytest --cov=src/nl_sql --cov-report=term-missing --cov-fail-under=85
repo-hygiene:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Verify repo-hygiene detector
run: python3 scripts/check_repo_hygiene.py --self-test
- name: Check no internal notes are tracked
run: python3 scripts/check_repo_hygiene.py
- name: Verify compare_results gate detector
run: python3 scripts/check_no_raw_compare.py --self-test
- name: No raw compare_results outside scripts/archive/
run: python3 scripts/check_no_raw_compare.py
pg-integration:
# Live Postgres 16 proof that the pipeline connection is genuinely read-only.
# These tests skip locally (no NL_SQL_PG_TEST_DSN); here they run for real.
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: nl_sql_demo
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d nl_sql_demo"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.8.23"
- name: Set up Python
run: uv python install 3.13
- name: Sync dependencies
run: uv sync --extra dev
- name: Read-only Postgres proof
env:
NL_SQL_PG_TEST_DSN: postgresql://postgres:postgres@localhost:5432/nl_sql_demo
run: uv run pytest tests/test_postgres_readonly.py -v