-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.31 KB
/
drizzle-schema-report.yml
File metadata and controls
44 lines (36 loc) · 1.31 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
name: Drizzle Schema Analysis Report
on:
pull_request:
paths:
- '**/*.ts'
- '**/*.tsx'
workflow_dispatch: # Allows manual triggering from the Actions tab
jobs:
analyze-schema:
runs-on: ubuntu-latest
name: Generate Schema Report
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Ensure Script is Executable
run: chmod +x scripts/db/audit_drizzle_schema.py
- name: Run Schema Analysis
run: python scripts/db/audit_drizzle_schema.py --output drizzle-schema-report.md
- name: Upload Report Artifact
uses: actions/upload-artifact@v4
with:
name: drizzle-schema-report
path: drizzle-schema-report.md
retention-days: 14
# Optional: Fail the PR if unmapped/orphaned tables (AI slop) are detected.
# Remove or comment out if you just want the report without blocking the PR.
- name: Check for AI Slop
run: |
if grep -q "### Unmapped / Orphaned Schema Tables" drizzle-schema-report.md; then
echo "::error::Orphaned Drizzle tables detected! Please review the schema for AI slop."
exit 1
fi