Skip to content

Machine-readable config description #2

Machine-readable config description

Machine-readable config description #2

Workflow file for this run

name: Schema
on:
pull_request:
paths:
- schema/**
- docs/usage/configuration/config_documentation.md
jobs:
validate-schema:
name: Ensure Synapse config schema is valid
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install check-jsonschema
run: pip install check-jsonschema
- name: Validate meta schema
run: check-jsonschema --check-metaschema schema/meta.schema.json
- name: Validate schema
run: check-jsonschema --schemafile=schema/meta.schema.json schema/synapse-config.schema.yaml
- name: Validate default config
run: echo "{}" | check-jsonschema --fill-defaults --schemafile=schema/synapse-config.schema.yaml -
check-doc-generation:
name: Ensure generated documentation is up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Regenerate config documentation
run: scripts-dev/gen_config_documentation.py schema/synapse-config.schema.json > docs/usage/configuration/config_documentation.md
- name: Log any differences
run: git diff
- name: Error in case of any differences
run: '! git status --porcelain=1 | grep "^ M"'