Skip to content

Commit 9cbe54c

Browse files
committed
Run full schema validation in CI
1 parent 99eee1b commit 9cbe54c

1 file changed

Lines changed: 12 additions & 23 deletions

File tree

.github/workflows/control-plane-validation.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,19 @@ jobs:
1111
- name: Check out repository
1212
uses: actions/checkout@v4
1313

14-
- name: Show Python version
15-
run: python3 --version
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install validation dependencies
20+
run: python3 -m pip install -r requirements-dev.txt
1621

1722
- name: Validate JSON syntax
18-
run: |
19-
python3 - <<'PY'
20-
import json
21-
import pathlib
22-
import sys
23+
run: make validate-json
2324

24-
failed = False
25-
for root in (pathlib.Path('schemas'), pathlib.Path('examples')):
26-
if not root.exists():
27-
continue
28-
for path in sorted(root.rglob('*.json')):
29-
try:
30-
json.loads(path.read_text())
31-
except Exception as exc:
32-
print(f'{path}: invalid JSON: {exc}', file=sys.stderr)
33-
failed = True
34-
if failed:
35-
raise SystemExit(1)
36-
print('JSON syntax validated.')
37-
PY
25+
- name: Validate JSON Schemas and examples
26+
run: make validate-schemas
3827

39-
- name: Validate control-plane examples
40-
run: python3 tools/validate_control_plane_examples.py
28+
- name: Validate control-plane semantic invariants
29+
run: make validate-control-plane

0 commit comments

Comments
 (0)