ci(audience): add Unity-tests workflow + close test-discovery gap (SDK-326)#743
Merged
ci(audience): add Unity-tests workflow + close test-discovery gap (SDK-326)#743
Conversation
7d89eea to
e10a762
Compare
6f72f9c to
6e4a8df
Compare
…K-326) Audience package's Unity-dependent tests have never run in CI: test-audience-sdk.yml's csproj excludes Tests/Runtime/Unity/** and Tests/Editor/**, and test-audience-sample-app.yml never discovered the package's tests because manifest.json had no testables entry. DeviceCollectorTests has shipped since SDK-297/298 with two compile errors no PR caught. Closes the gap with a dedicated single-cell GameCI Linux workflow that mirrors test-build.yml's pattern. testables is injected at CI time so the sample app's manifest.json stays uncontaminated and its existing PlayMode cells continue running only sample-app integration tests. * New test-audience-sdk-unity.yml — runs Runtime.Tests + Editor.Tests in EditMode on Unity 2022.3 with iOS module (UnityEditor.iOS.Xcode + UNITY_IOS). * Add InternalsVisibleTo on Immutable.Audience.Unity for the test asmdef so DeviceCollectorTests can see DeviceCollector and IDFVBridge. * Fix DeviceCollectorTests' is-not-string-s pattern (CS0165). * Replace Thread.Sleep with ManualResetEvent in SessionTests' drain-budget timeout test for deterministic timing on Mono editor. * Skip TimerDisposalTests' wait-handle invariant test on Mono runtimes where Timer.Dispose(WaitHandle) signals before in-flight callbacks complete (production code unaffected; SampleApp PlayMode tests exercise DrainHeartbeatTimer end-to-end). * Lower test-audience-sample-app.yml timeout from 60 to 30 min so hung cells release the self-hosted runner sooner.
6e4a8df to
68a9c84
Compare
ImmutableJeffrey
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audience package's Unity-dependent tests never ran in CI —
test-audience-sdk.yml(dotnet test) excludesUnityEngine/UnityEditorreferences, and the sample app workflow never discovered package tests becausemanifest.jsonhad notestablesentry.Changes
test-audience-sdk-unity.yml— single GameCI Linux cell (Unity 2022.3, iOS module, EditMode), runs bothImmutable.Audience.Runtime.TestsandImmutable.Audience.Editor.Tests.testablesis injected viajqin a CI step so the sample app workflow stays scoped to sample-app-only tests.InternalsVisibleTo("Immutable.Audience.Runtime.Tests")soDeviceCollector/IDFVBridge(internal) are accessible from tests.DeviceCollectorTests— splitis not string spattern (CS0165 on Mono).SessionTests— replacedThread.Sleep(1500)withManualResetEventto eliminate timing flake on slow runners.TimerDisposalTests—Assert.Ignoreon Mono; wait-handle invariant doesn't hold under Unity's Mono runtime (production path unaffected).test-audience-sample-app.yml— timeout lowered 60 → 30 min; healthy cells finish in ~10 min.Test plan