2023-07-29 19:05:29 +02:00
|
|
|
name: Validate JSON files
|
2022-04-05 17:51:40 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- web/atlas.json
|
2023-07-29 19:05:29 +02:00
|
|
|
- data/patches/*.json
|
2022-04-05 17:51:40 +02:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- web/atlas.json
|
2023-07-29 19:05:29 +02:00
|
|
|
- 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
|
2023-07-29 19:05:29 +02:00
|
|
|
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
|
2023-07-29 19:05:29 +02:00
|
|
|
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
|