Files
luanti_game_strata/.gitea/workflows/test.yml
T
claudeandClaude Opus 5.5 545bc7f202 Add headless test harness and Gitea Actions CI
tests/run.sh builds a throwaway world, installs the strata_selftest
worldmod and runs a dedicated server until the selftest shuts it down.
The selftest emerges a fixed-seed area and checks mapgen invariants
(surface, wall layer, shadow slab, light fading with depth), the recipe
registry, textures, tool ranges, and slime/avatar entity behavior. A run
passes only with zero FAIL and zero ERROR lines.

CI runs luacheck and the selftest on debian:trixie (Luanti 5.10).

Closes #18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:48:21 -05:00

28 lines
800 B
YAML

name: test
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
# Debian trixie ships Luanti 5.10, the engine version Strata targets.
container: debian:trixie
timeout-minutes: 15
steps:
- name: Install Luanti server, luacheck and checkout deps
run: |
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
luanti-server lua-check git nodejs ca-certificates
- uses: actions/checkout@v4
- name: luacheck
run: luacheck --no-color .
- name: Headless selftest
run: tests/run.sh "$RUNNER_TEMP/strata-test"
- name: Server log on failure
if: failure()
run: cat "$RUNNER_TEMP/strata-test/server.log" || true