JSON Validation #2363
This file contains hidden or 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: JSON Validation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: "0 4 * * *" | |
| jobs: | |
| validation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies (Common) | |
| run: | | |
| pip install check-jsonschema | |
| - name: Validate JSON file | |
| run: | | |
| check-jsonschema --schemafile cpu/microarchitectures_schema.json cpu/microarchitectures.json | |
| check-jsonschema --schemafile cpu/cpuid_schema.json cpu/cpuid.json | |
| - name: Check JSON file formatting | |
| run: | | |
| diff cpu/microarchitectures_schema.json <(jq . cpu/microarchitectures_schema.json) | |
| diff cpu/cpuid_schema.json <(jq . cpu/cpuid_schema.json) | |
| diff cpu/microarchitectures.json <(jq . cpu/microarchitectures.json) | |
| diff cpu/cpuid.json <(jq . cpu/cpuid.json) |