entity spawning
then shuts down. Run it in Gitea Actions on push, with luacheck as well.
Turn the ad-hoc selftest worldmod used during prototyping into a `tests/` world that runs `luanti --server`, emerges an area, and asserts on:
- mapgen invariants (surface height, layer contents, light gradient)
- recipe registry
- entity spawning
then shuts down. Run it in Gitea Actions on push, with luacheck as well.
claude
added this to the v0.2 Core Feel milestone 2026-11-07 18:27:43 +00:00
tests/run.sh [scratch_dir]: builds a throwaway world, exposes the checkout as games/strata via MINETEST_GAME_PATH (works whatever the checkout dir is called), installs the tests/strata_selftest worldmod and runs a dedicated server (luanti --server or luantiserver). Fails on any FAIL line, any ERROR line, a missing TEST summary, a non-zero exit or a timeout. Env knobs: LUANTI, STRATA_TEST_PORT, STRATA_TEST_TIMEOUT, STRATA_TEST_FILTER.
strata_selftest: small framework (selftest.register(name, fn, {async=true}), t.assert, t.eq, t.after, t.wrap, t.done). It emerges a fixed-seed area at noon, runs the cases in order, then calls core.request_shutdown.
Cases: registry (textures exist, item range ≥ POINT_RANGE, tools never break), mapgen (surface nodes, desert/sand, underground contents, wall layer/backdrop, shadow slab, surface light ≥14 and deep cave air ≤3), crafting (recipes reference registered items/stations, every station craftable, input validation), entities (slime falls and stays on the plane, an ownerless avatar removes itself), player helpers.
.luacheckrc plus .gitea/workflows/test.yml: debian:trixie container (Luanti 5.10), luacheck, then the selftest.
Docs: tests/README.md, plus README/DESIGN pointers.
Tested: 16/16 cases locally (Luanti 5.10.0) and in a clean debian:trixie container with luantiserver. luacheck: 0 warnings. I also checked that deliberate sync and async failures are reported and fail the run.
Follow-ups: nothing can exercise a real client headless, so the avatar/camera code is tested only through its helpers. Camera and HUD changes still need a manual look.
Done in 545bc7f.
**What changed**
- `tests/run.sh [scratch_dir]`: builds a throwaway world, exposes the checkout as `games/strata` via `MINETEST_GAME_PATH` (works whatever the checkout dir is called), installs the `tests/strata_selftest` worldmod and runs a dedicated server (`luanti --server` or `luantiserver`). Fails on any `FAIL` line, any `ERROR` line, a missing `TEST summary`, a non-zero exit or a timeout. Env knobs: `LUANTI`, `STRATA_TEST_PORT`, `STRATA_TEST_TIMEOUT`, `STRATA_TEST_FILTER`.
- `strata_selftest`: small framework (`selftest.register(name, fn, {async=true})`, `t.assert`, `t.eq`, `t.after`, `t.wrap`, `t.done`). It emerges a fixed-seed area at noon, runs the cases in order, then calls `core.request_shutdown`.
- Cases: registry (textures exist, item range ≥ POINT_RANGE, tools never break), mapgen (surface nodes, desert/sand, underground contents, wall layer/backdrop, shadow slab, surface light ≥14 and deep cave air ≤3), crafting (recipes reference registered items/stations, every station craftable, input validation), entities (slime falls and stays on the plane, an ownerless avatar removes itself), player helpers.
- `.luacheckrc` plus `.gitea/workflows/test.yml`: `debian:trixie` container (Luanti 5.10), luacheck, then the selftest.
- Docs: `tests/README.md`, plus README/DESIGN pointers.
**Tested**: 16/16 cases locally (Luanti 5.10.0) and in a clean `debian:trixie` container with `luantiserver`. luacheck: 0 warnings. I also checked that deliberate sync and async failures are reported and fail the run.
**Follow-ups**: nothing can exercise a real client headless, so the avatar/camera code is tested only through its helpers. Camera and HUD changes still need a manual look.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Turn the ad-hoc selftest worldmod used during prototyping into a
tests/world that runsluanti --server, emerges an area, and asserts on:then shuts down. Run it in Gitea Actions on push, with luacheck as well.
Done in
545bc7f.What changed
tests/run.sh [scratch_dir]: builds a throwaway world, exposes the checkout asgames/strataviaMINETEST_GAME_PATH(works whatever the checkout dir is called), installs thetests/strata_selftestworldmod and runs a dedicated server (luanti --serverorluantiserver). Fails on anyFAILline, anyERRORline, a missingTEST summary, a non-zero exit or a timeout. Env knobs:LUANTI,STRATA_TEST_PORT,STRATA_TEST_TIMEOUT,STRATA_TEST_FILTER.strata_selftest: small framework (selftest.register(name, fn, {async=true}),t.assert,t.eq,t.after,t.wrap,t.done). It emerges a fixed-seed area at noon, runs the cases in order, then callscore.request_shutdown..luacheckrcplus.gitea/workflows/test.yml:debian:trixiecontainer (Luanti 5.10), luacheck, then the selftest.tests/README.md, plus README/DESIGN pointers.Tested: 16/16 cases locally (Luanti 5.10.0) and in a clean
debian:trixiecontainer withluantiserver. luacheck: 0 warnings. I also checked that deliberate sync and async failures are reported and fail the run.Follow-ups: nothing can exercise a real client headless, so the avatar/camera code is tested only through its helpers. Camera and HUD changes still need a manual look.