From 7b2c35f57cced4ea6878a22db65811d9f67f8368 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Mon, 6 Apr 2026 22:27:36 -0400 Subject: [PATCH] NS-21: fix GdUnit CI path casing; preflight and README note Linux res:// paths are case-sensitive; gdunit4 breaks, gdUnit4 is correct. --- .github/workflows/gdscript.yml | 14 +++++++++++++- client/README.md | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gdscript.yml b/.github/workflows/gdscript.yml index 37c0f92..f3a5276 100644 --- a/.github/workflows/gdscript.yml +++ b/.github/workflows/gdscript.yml @@ -23,6 +23,9 @@ on: jobs: lint_and_test: runs-on: ubuntu-latest + # Folder is addons/gdUnit4 (capital U). Lowercase gdunit4 fails on Linux (case-sensitive res://). + env: + GDUNIT_CMDTOOL: res://addons/gdUnit4/bin/GdUnitCmdTool.gd steps: - uses: actions/checkout@v4 @@ -58,7 +61,16 @@ jobs: working-directory: client run: ~/godot/Godot_v4.6-stable_linux.x86_64 --headless --import --path . --quit-after 10 + - name: Verify GDUnit path (Linux res:// is case-sensitive) + working-directory: client + run: | + test -f addons/gdUnit4/bin/GdUnitCmdTool.gd || { + echo "::error::Missing GdUnit CLI script. Use addons/gdUnit4 (capital U), not gdunit4." + ls -la addons/ || true + exit 1 + } + - name: GDUnit4 (headless) working-directory: client run: | - ~/godot/Godot_v4.6-stable_linux.x86_64 --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -a res://test + ~/godot/Godot_v4.6-stable_linux.x86_64 --headless --path . -s "$GDUNIT_CMDTOOL" --ignoreHeadlessMode -a res://test diff --git a/client/README.md b/client/README.md index 33b0565..0a1160c 100644 --- a/client/README.md +++ b/client/README.md @@ -98,6 +98,8 @@ godot --headless --import --path . --quit-after 8 godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -a res://test ``` +On **Linux** (including GitHub Actions), the path must be **`gdUnit4`** with a capital **`U`**; `gdunit4` does not resolve. + **Scope:** Unit tests cover **`player.gd`**, **`position_authority_client.gd`**, and **`ground_pick.gd`** (walkable collider check). **`main.gd`**, full **`_input` / ray pick** flows, and scene wiring are **not** automated here—use manual checks above. **Reports:** GdUnit writes under **`reports/`** (gitignored); ignore locally generated HTML/XML when committing.