From 370614dce32197e8c9478498f9e5aaadd1164056 Mon Sep 17 00:00:00 2001 From: thethreemagi Date: Fri, 31 Jul 2026 17:50:41 +0100 Subject: [PATCH] Add CI validating season files on push and pull request --- .gitea/workflows/validate.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/validate.yml 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