From 9b91f2db37365552395447d3c649a87b049bd498 Mon Sep 17 00:00:00 2001 From: DysektAI <33468668+DysektAI@users.noreply.github.com> Date: Fri, 27 Nov 2026 19:43:14 -0500 Subject: [PATCH] ci: run offline checks before building the data bundle --- .github/workflows/build-release.yml | 1 + scripts/test_build_data.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 8b32c62f..7458e0d9 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -59,6 +59,7 @@ jobs: ruff check scripts ruff format --check scripts python -m compileall -q scripts + python -m unittest discover -s scripts -p 'test_*.py' -q - name: Build Data.zip run: python scripts/build_data.py diff --git a/scripts/test_build_data.py b/scripts/test_build_data.py index 53984515..fb861d15 100644 --- a/scripts/test_build_data.py +++ b/scripts/test_build_data.py @@ -132,6 +132,8 @@ def fetch(url: str, **_kwargs) -> bytes: self.assertEqual(icon["renderedSlots"], {"width": 2, "height": 3}) self.assertEqual(icon["declaredSlots"], {"width": 2, "height": 3}) self.assertTrue(icon["slotDimensionsMatch"]) + with Image.open(io.BytesIO(bundle.read(icon["path"]))) as rendered: + self.assertEqual(rendered.size, (127, 190)) for entry in bundle.infolist(): self.assertEqual(entry.date_time, (1980, 1, 1, 0, 0, 0)) self.assertEqual(build_data.build(arguments).read_bytes(), first)