File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,3 +100,28 @@ jobs:
100100 path : node_modules
101101 key : node-modules-${{ hashFiles('package-lock.json') }}
102102 - run : npm run typecheck
103+
104+ schema-check :
105+ needs : setup
106+ if : ${{ !startsWith(github.head_ref, 'release/') }}
107+ runs-on : ubuntu-latest
108+ steps :
109+ - uses : actions/checkout@v6
110+ - uses : actions/setup-node@v6
111+ with :
112+ node-version : 20.x
113+ - uses : actions/cache/restore@v5
114+ with :
115+ path : node_modules
116+ key : node-modules-${{ hashFiles('package-lock.json') }}
117+ - run : npm run build
118+ - run : node scripts/generate-schema.mjs
119+ - name : Check for schema drift
120+ run : |
121+ if ! git diff --exit-code schemas/; then
122+ echo ""
123+ echo "❌ JSON schema is out of date with Zod source schemas."
124+ echo "Run 'npm run build && node scripts/generate-schema.mjs' and commit the result."
125+ exit 1
126+ fi
127+ echo "✓ JSON schema is up to date"
You can’t perform that action at this time.
0 commit comments