testing wis2box metadata #299
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: validate schema and examples | |
on: | |
push: | |
paths: | |
- '**.json' | |
- '**.yaml' | |
pull_request: | |
paths: | |
- '**.json' | |
- '**.yaml' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Setup Python ${{ matrix.python-version }} | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements 📦 | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install check-jsonschema pywcmp | |
pywcmp bundle sync | |
- name: Run JSON Schema validation | |
run: | | |
check-jsonschema --check-metaschema schemas/wcmp2-bundled.json | |
for e in examples/*.json; do check-jsonschema --schemafile schemas/wcmp2-bundled.json $e; done | |
- name: Run pywcmp ETS validation | |
run: | | |
for e in examples/*.json; do pywcmp ets validate $e; done | |
- name: Run pywcmp ETS validation on failing examples | |
continue-on-error: true | |
run: | | |
for e in examples/failing/*.json; do pywcmp ets validate $e; done |