Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Aug 27, 2023
1 parent ac060a1 commit b43ff86
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/scenario-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Validate scenarios against schema
on:
push:
paths:
- 'data/scenarios/**.yaml'
branches:
- main
pull_request:
paths:
- 'data/scenarios/**.yaml'
branches:
- main
jobs:
validate-scenario-schema:
name: Validate scenarios schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install check-jsonschema
- run: |
find data/scenarios -name "*.yaml" -type f -print0 | xargs -0 check-jsonschema --base-uri $(git rev-parse --show-toplevel)/data/schema/scenario.json --schemafile data/schema/scenario.json

0 comments on commit b43ff86

Please sign in to comment.