From af055b342c3ed4b0120ade78c07c2bf60dfd925e Mon Sep 17 00:00:00 2001 From: Patrick Buckley Date: Sat, 13 Jun 2026 00:22:01 -0700 Subject: [PATCH] ci(examples): run the Understone example test suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The door-game example is a standalone package (no turnstone-core dependency) that the root suite does not collect — its testpaths are scoped to ["tests"], so the example's 419 tests, ruff, and mypy gates never ran in CI. Add a path-filtered workflow that installs the example and runs its full gate (pytest + ruff check + ruff format --check + mypy) whenever examples/door-game (or this workflow) changes, across the example's declared Python floor and ceiling (3.11, 3.13). Pinned action SHAs and contents:read permissions match the existing CI workflows. (cherry picked from commit 30c09aaf511ef9d3eb9aca955ec7f41661113a77) --- .github/workflows/understone-example.yml | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/understone-example.yml diff --git a/.github/workflows/understone-example.yml b/.github/workflows/understone-example.yml new file mode 100644 index 00000000..0724e7c8 --- /dev/null +++ b/.github/workflows/understone-example.yml @@ -0,0 +1,42 @@ +name: Understone example + +# The door-game example is a standalone package with no dependency on +# turnstone core, and the root test suite does not collect it +# (testpaths=["tests"]). Without this workflow its suite never runs in CI. +# Path-filtered so it only runs when the example (or this workflow) changes. + +on: + push: + branches: [main, "stable/*"] + paths: + - "examples/door-game/**" + - ".github/workflows/understone-example.yml" + pull_request: + branches: [main, "stable/*"] + paths: + - "examples/door-game/**" + - ".github/workflows/understone-example.yml" + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: examples/door-game + strategy: + matrix: + # Floor and ceiling of the example's requires-python (>=3.11). + python-version: ["3.11", "3.13"] + steps: + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: ${{ matrix.python-version }} + - run: pip install -e ".[test,dev]" + - run: pytest tests/ -q + - run: ruff check . + - run: ruff format --check . + - run: mypy understone/