-
Notifications
You must be signed in to change notification settings - Fork 247
42 lines (37 loc) · 1.36 KB
/
schema.yaml
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
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"'