From cec57a1a84f5c6928dc7a9fef3d6c0db3f58047f Mon Sep 17 00:00:00 2001 From: NaveenKumar Namachivayam Date: Sat, 12 Sep 2026 20:06:00 -0400 Subject: [PATCH] CI: add Python validation job (uv, validate.py, unit tests) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing workflow only ran `mvn -B verify`, so the repo's own gate — `tools/validate.py` plus the validator's unit tests — was never enforced on PRs. Adds a python-validate job that installs uv via pipx (already on the runner image, avoids a new third-party action on the ASF allowlist), syncs dev dependencies, validates examples, and runs the unittest suite. Note: validate.py currently exits 0 vacuously since examples/ is not yet on main; the job starts validating records automatically once examples land. The unit tests provide real signal in the meantime. Apache-ai: Yes Generated-by: Devin (SWE-2 High) Reviewed-by: nkn --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4197bed..0d67be4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,3 +39,23 @@ jobs: - name: Build and check run: mvn -B verify + + python-validate: + name: Python validation (schema/SHACL examples + unit tests) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # pipx is preinstalled on GitHub-hosted runners; installing uv this + # way avoids adding a third-party action to the ASF allowlist. + - name: Install uv + run: pipx install uv + + - name: Install dev dependencies + run: uv sync --extra dev + + - name: Validate examples against schema + SHACL + run: uv run python tools/validate.py + + - name: Run validator unit tests + run: uv run python -m unittest discover -s tests