diff --git a/.gitea/workflows/validate.yml b/.gitea/workflows/validate.yml new file mode 100644 index 0000000..decfce5 --- /dev/null +++ b/.gitea/workflows/validate.yml @@ -0,0 +1,37 @@ +name: validate + +# Catalog edits arrive as pull requests from mods, so validation has to run +# before merge — a malformed season file would otherwise reach the bot's next +# catalog reload. +on: + pull_request: + paths: + - "seasons/**" + - "schema/**" + - "scripts/validate.py" + - ".gitea/workflows/validate.yml" + push: + branches: [main] + paths: + - "seasons/**" + - "schema/**" + - "scripts/validate.py" + - ".gitea/workflows/validate.yml" + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install jsonschema + run: pip install --quiet jsonschema + + - name: Validate season files + run: python scripts/validate.py