diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 00000000..9928c584 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,12 @@ +name: Validate JSON +on: [push, pull_request] +jobs: + Validate-JSON: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Validate JSON + run: | + chmod +x ${{ github.workspace }}/tools/validate_json.py + python3 ${{ github.workspace }}/tools/validate_json.py ${{ github.workspace }}/web/atlas.json \ No newline at end of file diff --git a/tools/validate_json.py b/tools/validate_json.py new file mode 100644 index 00000000..64e5b7c8 --- /dev/null +++ b/tools/validate_json.py @@ -0,0 +1,14 @@ +#!/usr/bin/python + +import sys +import json + +path = "./../web/atlas.json" + +# path override as 1st param: validate_json.py path_to_file.json +if (len(sys.argv) > 1): + path = sys.argv[1] + +json.load(open(path)) + +print("JSON is valid") \ No newline at end of file