-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.47 KB
/
validate.yml
File metadata and controls
52 lines (43 loc) · 1.47 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
name: Validate
on:
pull_request:
push:
branches:
- main
- "codex/**"
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install YAML parser
run: python -m pip install --disable-pip-version-check pyyaml
- name: Validate repo structure
run: python tools/validate-repo.py
- name: Validate Codex metadata
run: |
python - <<'PY'
import pathlib
import yaml
path = pathlib.Path("nutrient-document-processing/agents/openai.yaml")
data = yaml.safe_load(path.read_text())
interface = data.get("interface", {})
required = ["display_name", "short_description", "default_prompt"]
missing = [key for key in required if key not in interface]
if missing:
raise SystemExit(f"openai.yaml missing interface keys: {missing}")
print("openai.yaml parsed successfully")
PY
- name: Compile Python scripts
run: |
python -m py_compile nutrient-document-processing/scripts/*.py nutrient-document-processing/scripts/lib/common.py
- name: Smoke test script help
run: |
for script in nutrient-document-processing/scripts/*.py; do
python "$script" --help > /dev/null
done