diff --git a/.github/workflows/check-schema.yml b/.github/workflows/check-schema.yml new file mode 100644 index 0000000..ccfe351 --- /dev/null +++ b/.github/workflows/check-schema.yml @@ -0,0 +1,27 @@ +name: Check schema + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +jobs: + check-schema: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Get schema.json from latest release + run: | + URL=`curl -s https://api.github.com/repos/jaoafa/pat-star-systems/releases/latest | grep "browser_download_url.*json\"" | cut -d : -f 2,3 | tr -d \"` + curl -L -o schema.json $URL + + - name: Check schema + run: | + pip install jsonschema + find stella -name "*.pas" | xargs -I{} jsonschema -i {} schema.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4bc64a9..673b35b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,6 @@ jobs: - name: Create schema run: | - mkdir -p schema node ./.github/scripts/create-schema.js sha1sum -b schema.json > schema.json.sha1