Skip to content

build(deps): bump actions/checkout from 4.3.1 to 7.0.1 #109

build(deps): bump actions/checkout from 4.3.1 to 7.0.1

build(deps): bump actions/checkout from 4.3.1 to 7.0.1 #109

Workflow file for this run

name: Validate integrations
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Validate integration manifests against schema
run: |
pip install jsonschema pyyaml
python - <<'PY'
import json, sys, pathlib, yaml, jsonschema
schema = json.loads(pathlib.Path("schema/integration.schema.json").read_text())
failures = 0
dirs = [d for d in pathlib.Path("integrations").iterdir() if d.is_dir() and not d.name.startswith("_")]
for d in dirs:
manifest = d / "integration.yaml"
readme = d / "README.md"
if not manifest.exists():
print(f"FAIL {d.name}: missing integration.yaml"); failures += 1; continue
if not readme.exists():
print(f"FAIL {d.name}: missing README.md"); failures += 1; continue
try:
jsonschema.validate(yaml.safe_load(manifest.read_text()), schema)
print(f"OK {d.name}")
except jsonschema.ValidationError as e:
print(f"FAIL {d.name}: {e.message}"); failures += 1
print(f"{len(dirs)} integration(s), {failures} failure(s)")
sys.exit(1 if failures else 0)
PY