diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 461172c2..b0fc97e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,3 +33,15 @@ jobs: - name: Check formatting run: cargo +nightly fmt --verbose --all --check + + - name: Validate configs + uses: cardinalby/schema-validator-action@v3 + with: + file: 'etc/defaults/config*.yaml' + schema: 'schema/json/config.schema.json' + + - name: Validate themes + uses: cardinalby/schema-validator-action@v3 + with: + file: 'etc/defaults/themes/*.yaml|src/testing/assets/themes/*.yaml' + schema: 'schema/json/theme.schema.json' diff --git a/schema/json/theme.schema.json b/schema/json/theme.schema.json index 72e4e881..37b10405 100644 --- a/schema/json/theme.schema.json +++ b/schema/json/theme.schema.json @@ -1,6 +1,5 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema:theme", "$ref": "#/definitions/theme", "definitions": { "theme": { diff --git a/src/testing/assets/themes/test.yaml b/src/testing/assets/themes/test.yaml index c13bb405..369cf5b2 100644 --- a/src/testing/assets/themes/test.yaml +++ b/src/testing/assets/themes/test.yaml @@ -1,5 +1,5 @@ # yaml-language-server: $schema=../../../../schema/json/theme.schema.json -$schema: ../../../../schema/json/theme.schema.json +$schema: https://raw.githubusercontent.com/pamburus/hl/master/schema/json/theme.schema.json elements: input: