Skip to content

docs+chore: resolve v1.0.0 followups (Astro site, schema gap, derived artifacts, tooling, tutorial) #10

docs+chore: resolve v1.0.0 followups (Astro site, schema gap, derived artifacts, tooling, tutorial)

docs+chore: resolve v1.0.0 followups (Astro site, schema gap, derived artifacts, tooling, tutorial) #10

Workflow file for this run

---
name: Validate MIF Bundles and Schemas
"on":
push:
branches: [main]
paths:
- 'schema/**'
- 'examples/**'
- 'profiles/**'
- 'ontologies/**'
- 'scripts/*.py'
- 'docs/**'
- 'src/content/docs/**'
- 'package.json'
- 'astro.config.mjs'
pull_request:
branches: [main, "release/**", "develop/**"]
paths:
- 'schema/**'
- 'examples/**'
- 'profiles/**'
- 'ontologies/**'
- 'scripts/*.py'
- 'docs/**'
- 'src/content/docs/**'
- 'package.json'
- 'astro.config.mjs'
workflow_dispatch:
jobs:
okf-conformance:
name: OKF Conformance + Lossless Round-Trip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: pip install pyyaml
- name: OKF conformance test (relationship sync + round-trip)
run: |
python scripts/okf_validate.py \
examples \
profiles/ai-memory/examples \
ontologies/examples/memories
- name: Lossless markdown -> json-ld -> markdown round-trip
run: |
python scripts/mif_convert.py roundtrip \
examples \
profiles/ai-memory/examples \
ontologies/examples/memories
schema-validation:
name: Validate JSON-LD Projection Against Schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: pip install pyyaml
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- name: Install ajv-cli
run: npm install -g ajv-cli ajv-formats
- name: Emit derived JSON-LD projections
run: |
python scripts/mif_convert.py emit-jsonld \
examples profiles/ai-memory/examples ontologies/examples/memories \
--out-dir dist/jsonld
- name: Validate every projection against schema/mif.schema.json
run: |
# ajv-cli detects the parser by file extension and does not recognize
# .jsonld, so validate .json copies of the derived projections.
find dist/jsonld -name '*.jsonld' -print0 | while IFS= read -r -d '' f; do
json="${f%.jsonld}.json"
cp "$f" "$json"
echo "Validating $json"
ajv validate -s schema/mif.schema.json \
-r "schema/definitions/*.schema.json" \
-d "$json" --spec=draft2020 -c ajv-formats
done
docs-build:
name: Build Docs Site (Astro)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Build Astro site
run: npm run build
validate-ontologies:
name: Validate Ontology Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: pip install jsonschema pyyaml
- name: Validate ontology files
run: python scripts/validate-ontologies.py
- name: Validate namespace consistency
run: python scripts/validate-namespaces.py