Skip to content

[9/16] Desktop: EditMode tests and test workflow - #28

Draft
richardelms-stash wants to merge 3 commits into
desktop/01-runtime-bridgefrom
desktop/02-editmode-tests
Draft

richardelms-stash wants to merge 3 commits into
desktop/01-runtime-bridgefrom
desktop/02-editmode-tests

Conversation

@richardelms-stash

@richardelms-stash richardelms-stash commented Aug 26, 2026 •

Copy link
Copy Markdown

TL;DR

  • EditMode tests for the desktop bridge (config-to-JSON, event dispatch, native load) and a CI workflow that runs them on every push and PR.

stash-unity stack PR 2 of 5 (targets desktop/01-runtime-bridge, #27). Linear: LAU-299

What

  • Packages/gg.stash.unity/Tests/Editor/ (Stash.Unity.Tests.Editor): config struct -> desktop JSON (mobile field names, desktop keys, defaults, null background), desktop event -> public event and per-call callback dispatch through StashNative.HandleDesktopEvent (dismissed clears the per-call slots, autoClose = false delivers failure then success then dismiss, pageLoaded parses invariant ms, diagnostics and processing events fire nothing), and the native host loading from the package with a repeatable Shutdown.
  • .github/workflows/test.yml: game-ci/unity-test-runner@v4 EditMode on every push and PR (Linux runner, so the native-load tests are compiled out there; they ran locally on macOS).

Verified

  • Unity 6000.3.21f1 batchmode -runTests -testPlatform EditMode on a scratch copy of the project: 15 tests, 15 passed, 0 failed.
  • dotnet format whitespace --verify-no-changes clean.

馃 Generated with Claude Code

https://claude.ai/code/session_01FuG7FjNCGRKxPchjZ8AuUV


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Stash.Unity.Tests.Editor: config struct to desktop JSON serialization
and defaults, desktop event name to public event and per-call callback
dispatch (dismissed clears the slots, autoClose off delivers failure then
success, diagnostics fire nothing), and the vendored native host loading
from the package with a repeatable shutdown. test.yml runs EditMode on
every push and PR with unity-test-runner.
Only the native-host-load tests stay gated to Windows and macOS editors,
so the Linux CI runner executes a non-empty suite.
@richardelms-stash
richardelms-stash force-pushed the desktop/01-runtime-bridge branch from db8cdbd to f01fcb7 Compare August 26, 2026 10:58
@richardelms-stash
richardelms-stash force-pushed the desktop/02-editmode-tests branch from 72da1a2 to b991bb4 Compare August 26, 2026 10:58
The tests passed (11 on Linux) but the job failed publishing the check
run: the default token on a pull request cannot create checks.
@richardelms-stash richardelms-stash changed the title Desktop: EditMode tests and test workflow [9/16] Desktop: EditMode tests and test workflow Aug 26, 2026
@richardelms-stash

Copy link
Copy Markdown
Author

/ripley review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant