diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5078ee..3bec41c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,39 @@ jobs: - name: Build source and wheel distributions run: python -m build --sdist --wheel + - name: Verify wheel contents and entry point + run: | + python - <<'PY' + from pathlib import Path + from zipfile import ZipFile + + wheels = list(Path("dist").glob("*.whl")) + if len(wheels) != 1: + raise SystemExit(f"expected one wheel, found: {wheels}") + + with ZipFile(wheels[0]) as archive: + names = set(archive.namelist()) + required = { + "app.py", + "obliteratus/__init__.py", + "obliteratus/local_ui.py", + } + missing = sorted(required - names) + if missing: + raise SystemExit(f"wheel is missing required modules: {missing}") + + entry_points = [ + name for name in names if name.endswith(".dist-info/entry_points.txt") + ] + if len(entry_points) != 1: + raise SystemExit(f"expected one entry_points.txt, found: {entry_points}") + contents = archive.read(entry_points[0]).decode("utf-8") + if "obliteratus = obliteratus.cli:main" not in contents: + raise SystemExit("wheel is missing the obliteratus console entry point") + + print(f"verified wheel contents: {wheels[0]}") + PY + lint: name: Ruff runs-on: ubuntu-latest