Skip to content

ci: run the runtime tests on desktop, WebAssembly, Android and iOS - #3160

Merged
kazo0 merged 1 commit into
mainfrom
msal-1-ci-lanes
Aug 25, 2026
Merged

kazo0 merged 1 commit into
mainfrom
msal-1-ci-lanes

Conversation

@kazo0

@kazo0 kazo0 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): closes #3156 (layer 1/4 of #3155)

Stack 1/4 — base: main. Review only this layer's diff. Top-down skim: #3155 lists the four layers; this is the bottom, and nothing above it lands until it does.

PR Type

  • Build or CI related changes

What is the current behavior?

No CI stage runs the runtime tests on any device. src/Uno.Extensions.RuntimeTests has a hot-reload lane on Skia desktop and nothing else; the WebAssembly, Android and iOS heads had never been built by CI, and two of them did not even compile (a partial and a copy-local defect, fixed in #3151 and here).

What is the new behavior?

Four runtime-test lanes — desktop (Skia), WebAssembly, Android emulator, iOS simulator. Build stages publish each head as a pipeline artifact; test stages boot the target, run the engine with a namespace filter and harvest NUnit results. Ported from Studio Live's setup, with the failure modes it hit fixed on the way: bounded waits (an emulator that never registers used to eat the 120-minute job budget with no logs), inline emulator logs, ANDROID_AVD_HOME pinned so avdmanager and emulator agree, the signed APK picked deliberately, assemblies embedded in the Debug APK, and a results validator that fails an empty or all-skipped run.

Runtime-test head plumbing: MobileRuntimeTestsAutostart drives UnitTestsControl and writes the NUnit document on Android/iOS (the engine's own runner calls Console.CancelKeyPress and throws in a sandboxed app); WebAssemblyRuntimeShim supplies the __WASM__ symbol and InvokeJS the source-shipped engine still branches on; MainActivity uses GetExternalFilesDir for the results path; the iOS head carries the keychain entitlement MSAL's cache accessor demands on that platform.

Two build fixes the lanes exposed: src/Directory.Build.targets exempts AndroidApplication heads from the library-only Private=false rule — .NET Android rewrites an app head's OutputType to Library, which emptied ReferenceCopyLocalPaths and shipped APKs without their ProjectReference closure; and src/Directory.Build.props turns the trim/AOT analyzers off for test and sample projects, which are never published trimmed and only turned "this test calls the API it exists to test" into IL2026 errors on the WebAssembly heads.

Filter: RuntimeTestsFilter is Storage.UI.Tests (from #3153), green on every lane today. Layer 2 adds the MSAL namespace; !_HotReload waits on 15 rotted cases in the wider suite. The engine filter is a substring match with | for OR, so this must stay a namespace fragment — a class name silently drops its siblings.

PR Checklist

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template — AGENTS.md (the new Window() rule for UI tests) and specs/lessons.md
  • Unit Tests and/or UI Tests for the changes have been added — CI configuration; the lanes run tests
  • Wasm UI Tests are not showing any unexpected differences
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

Verified locally: the desktop head builds and Storage.UI.Tests runs 8/8 through it. The mobile autostart was also driven on the desktop head (it compiles for every head and is gated only on UITEST_RUNTIME_AUTOSTART_RESULT_FILE): the success path exits 0 with the 8 results written, an unwritable result path exits 1 with the exception and stack on stderr. The four lanes themselves were green on #3139 (builds 229724 onward) with this exact YAML; this PR is the first run of them against main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EqfQh5ovrPEvFGcERLiLhH

@kazo0
kazo0 force-pushed the msal-1-ci-lanes branch 3 times, most recently from f41379c to 0d5e6a2 Compare August 25, 2026 15:37
Layer 1/4 of the MSAL authentication work (#3139): the device lanes, without
any MSAL code. Build stages publish each head as a pipeline artifact; test
stages boot an emulator / simulator / headless browser, run the engine with a
namespace filter and harvest NUnit results. Ported from Studio Live's setup.

- Four lanes (stage-runtime-tests-{desktop,wasm,android,ios}.yml) fed by
  stage-build-runtimetests-mobile.yml; scripts under build/test-scripts with
  bounded waits, inline emulator logs and a results validator that fails on an
  empty or all-skipped run
- Runtime-test head: MobileRuntimeTestsAutostart drives UnitTestsControl and
  writes the NUnit document on Android/iOS (the engine's own runner throws
  PlatformNotSupportedException in a sandboxed app); WebAssemblyRuntimeShim
  supplies the __WASM__ symbol and InvokeJS the source-shipped engine needs;
  MainActivity uses GetExternalFilesDir for the results path; the iOS head
  carries the keychain entitlement MSAL's cache accessor demands
- src/Directory.Build.targets exempts AndroidApplication heads from the
  library-only Private=false rule: .NET Android rewrites an app head's
  OutputType to Library, which emptied ReferenceCopyLocalPaths and shipped
  APKs without their ProjectReference closure
- src/Directory.Build.props turns the trim/AOT analyzers off for test and
  sample projects; they only turned "this test calls the API it exists to
  test" into IL2026 errors on the WebAssembly heads
- Given_NavigationRouteUpdateHandler (#3146, merged under this branch) becomes
  partial: the Android/iOS native-ctor generator emits a partial for it, and
  main never compiles the Navigation UI tests for a device TFM, so these lanes
  are the first build to see CS0260
- RuntimeTestsFilter is Storage.UI.Tests: green on every lane today. The
  MSAL namespace joins it in the next layer; '!_HotReload' waits on 15 rotted
  cases in the wider suite

AGENTS.md records the new Window() rule (mobile rejects secondary windows);
specs/lessons.md the CI lessons.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EqfQh5ovrPEvFGcERLiLhH
@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@kazo0
kazo0 merged commit 6ac82e1 into main Aug 25, 2026
26 of 27 checks passed
@kazo0
kazo0 deleted the msal-1-ci-lanes branch August 25, 2026 16:37
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.

Run the runtime tests on desktop, WebAssembly, Android and iOS

2 participants