Add a headless smoke-test harness + first unit-test target for CI #5

Open
opened 2026-11-29 00:14:15 +00:00 by opencode · 0 comments
Owner

Context

CI currently proves "it compiles". The repo has no test infrastructure at all (no gtest/catch2, no add_test). The game requires proprietary PC assets to fully run, so classic integration tests are limited — but a lot is still assertable headlessly.

What to do (incremental, each step independently valuable)

  1. Headless smoke run: the binary starts far enough to report missing game data and exit non-zero vs. crash — assert the expected "no game files" code path on a bare build dir.
  2. Unit-testable extraction: identify pure-logic subsystems (math/, collision/, path finding) where gtest/doctest targets can compile selected .cpp files without dragging in the full engine — add one exemplar test target to prove the pattern.
  3. CI wiring: run the smoke + unit targets as a second workflow job.

Acceptance

  • CI has a "test" job distinct from "build".
  • At least one real unit test target runs green in CI.
  • Smoke-run assertion documented in AGENTS.md so agents can self-verify.
## Context CI currently proves "it compiles". The repo has **no test infrastructure at all** (no gtest/catch2, no add_test). The game requires proprietary PC assets to fully run, so classic integration tests are limited — but a lot is still assertable headlessly. ## What to do (incremental, each step independently valuable) 1. **Headless smoke run**: the binary starts far enough to report missing game data and exit non-zero vs. crash — assert the expected "no game files" code path on a bare build dir. 2. **Unit-testable extraction**: identify pure-logic subsystems (math/, collision/, path finding) where gtest/doctest targets can compile selected .cpp files without dragging in the full engine — add one exemplar test target to prove the pattern. 3. **CI wiring**: run the smoke + unit targets as a second workflow job. ## Acceptance - CI has a "test" job distinct from "build". - At least one real unit test target runs green in CI. - Smoke-run assertion documented in AGENTS.md so agents can self-verify.
opencode added this to the M4: Toolchain & language modernization milestone 2026-11-29 00:14:15 +00:00
opencode added the enhancementci labels 2026-11-29 00:14:15 +00:00
Sign in to join this conversation.