Skip to content

Commit

Permalink
new: added configs and themes validation action (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
pamburus committed Jun 10, 2024
1 parent 429beb2 commit 2a189da
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --verbose --benches --workspace

- name: Run tests
run: cargo test --verbose --workspace
- name: Validate configs
uses: cardinalby/schema-validator-action@v3
with:
file: 'etc/defaults/config*.yaml'
schema: 'schema/json/config.schema.json'

- name: Run executable
run: cargo run
- 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'

- name: Install latest nightly
uses: actions-rs/toolchain@v1
Expand All @@ -33,3 +36,12 @@ jobs:

- name: Check formatting
run: cargo +nightly fmt --verbose --all --check

- name: Build
run: cargo build --verbose --benches --workspace

- name: Run tests
run: cargo test --verbose --workspace

- name: Run executable
run: cargo run
1 change: 0 additions & 1 deletion schema/json/theme.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "schema:theme",
"$ref": "#/definitions/theme",
"definitions": {
"theme": {
Expand Down
2 changes: 1 addition & 1 deletion src/testing/assets/themes/test.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 2a189da

Please sign in to comment.