atlas/.github/workflows/validate-json.yml

31 lines
857 B
YAML
Raw Normal View History

name: Validate JSON files
on:
push:
paths:
- web/atlas.json
- data/patches/*.json
pull_request:
paths:
- web/atlas.json
- data/patches/*.json
2022-04-05 12:53:53 +02:00
jobs:
2023-03-21 13:32:28 +01:00
validate:
2023-05-17 17:45:12 +02:00
name: Validate
permissions:
contents: read
2022-04-05 12:53:53 +02:00
runs-on: ubuntu-latest
steps:
2023-03-21 13:32:28 +01:00
- name: Checkout code
2022-04-05 12:53:53 +02:00
uses: actions/checkout@v3
2023-05-17 17:45:12 +02:00
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tools/ci/requirements.txt') }}
2023-05-17 17:45:12 +02:00
restore-keys: |
${{ runner.os }}-pip-
- name: Validate
2023-04-25 08:19:52 +02:00
run: |
pip3 install -r tools/ci/requirements.txt
2023-06-16 12:13:08 +02:00
python3 tools/ci/validate_json.py web/atlas.json tools/schema/atlas.json
python3 tools/ci/validate_json.py data/patches tools/schema/patch.json