From ce7a4282dd6e05006f055223be34f7dc3a94aa72 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 26 Jun 2026 10:31:50 +0200 Subject: [PATCH 1/3] skip on unity 2021 when targeting webgl --- .github/workflows/test-run-webgl.yml | 1 + test/IntegrationTest/CommonTestCases.ps1 | 7 +++++++ test/IntegrationTest/Integration.Tests.ps1 | 1 + test/Scripts.Integration.Test/Scripts/IntegrationTester.cs | 5 +++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-run-webgl.yml b/.github/workflows/test-run-webgl.yml index 2c9eb715e..d30b5025a 100644 --- a/.github/workflows/test-run-webgl.yml +++ b/.github/workflows/test-run-webgl.yml @@ -43,6 +43,7 @@ jobs: run: | $env:SENTRY_TEST_PLATFORM = "WebGL" $env:SENTRY_TEST_APP = "samples/IntegrationTest/Build" + $env:SENTRY_TEST_UNITY_VERSION = "${{ inputs.unity-version }}" Invoke-Pester -Path test/IntegrationTest/Integration.Tests.ps1 -CI - name: Upload test results on failure diff --git a/test/IntegrationTest/CommonTestCases.ps1 b/test/IntegrationTest/CommonTestCases.ps1 index cb910541e..4940ef69c 100644 --- a/test/IntegrationTest/CommonTestCases.ps1 +++ b/test/IntegrationTest/CommonTestCases.ps1 @@ -22,6 +22,13 @@ $CommonTestCases = @( # sets coexist at runtime. The build already fails to compile/link if aliasing # regresses; this asserts the runtime path too, so a runtime conflict turns the # build red rather than being swallowed into a log line. + + # The DependencyConflict package is not installed on Unity 2021 + WebGL + if ($TestSetup.Platform -eq "WebGL" -and $TestSetup.UnityVersion -like "2021*") { + Set-ItResult -Skipped -Because "DependencyConflict is not installed on Unity 2021 + WebGL" + return + } + $RunResult.Output | Where-Object { $_ -match "DependencyConflict: FAILED" } | Should -BeNullOrEmpty -Because "the DependencyConflict package threw at runtime - assembly aliasing likely regressed" $RunResult.Output | Where-Object { $_ -match "DependencyConflict: Dependencies say hi" } | diff --git a/test/IntegrationTest/Integration.Tests.ps1 b/test/IntegrationTest/Integration.Tests.ps1 index b0b475470..e9410a449 100644 --- a/test/IntegrationTest/Integration.Tests.ps1 +++ b/test/IntegrationTest/Integration.Tests.ps1 @@ -272,6 +272,7 @@ BeforeAll { # Initialize test parameters $script:TestSetup = [PSCustomObject]@{ Platform = $script:Platform + UnityVersion = $env:SENTRY_TEST_UNITY_VERSION Dsn = $env:SENTRY_DSN AuthToken = $env:SENTRY_AUTH_TOKEN } diff --git a/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs b/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs index 06050d4dc..1c0a52a72 100644 --- a/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs +++ b/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs @@ -4,7 +4,6 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using DependencyConflictPackage; using Sentry; using Sentry.Unity; using UnityEngine; @@ -39,15 +38,17 @@ private void Awake() // the build red too instead of being swallowed into a log line. private void ExerciseConflictingDependencies() { +#if !(UNITY_WEBGL && !UNITY_2022_1_OR_NEWER) try { - var greeting = DependencyConflictPackageClient.SayHiAsync().GetAwaiter().GetResult(); + var greeting = DependencyConflictPackage.DependencyConflictPackageClient.SayHiAsync().GetAwaiter().GetResult(); Logger.Log($"DependencyConflict: {greeting}"); } catch (Exception ex) { Logger.LogError($"DependencyConflict: FAILED - {ex}"); } +#endif } public void Start() From 0ddfaef197b3bd593090605f23cd29778e08c651 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 26 Jun 2026 10:33:38 +0200 Subject: [PATCH 2/3] make sure it actually works --- .github/workflows/create-unity-matrix.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-unity-matrix.yml b/.github/workflows/create-unity-matrix.yml index 95a4704cb..785b26de6 100644 --- a/.github/workflows/create-unity-matrix.yml +++ b/.github/workflows/create-unity-matrix.yml @@ -13,8 +13,9 @@ on: value: ${{ jobs.create-unity-matrix.outputs.unity-matrix }} env: + # TEMPORARY: only run on Unity 2021 # Unity versions used in PRs - PR_UNITY_VERSIONS: '["2022.3", "6000.3", "6000.5"]' + PR_UNITY_VERSIONS: '["2021.3"]' # Unity versions used on main branch FULL_UNITY_VERSIONS: '["2021.3", "2022.3", "6000.0", "6000.3", "6000.5"]' From cb2ca5af6ac8e06af9650c33ee8a559aae60dd42 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 26 Jun 2026 11:08:49 +0200 Subject: [PATCH 3/3] reverted temp 2021 limit --- .github/workflows/create-unity-matrix.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create-unity-matrix.yml b/.github/workflows/create-unity-matrix.yml index 785b26de6..95a4704cb 100644 --- a/.github/workflows/create-unity-matrix.yml +++ b/.github/workflows/create-unity-matrix.yml @@ -13,9 +13,8 @@ on: value: ${{ jobs.create-unity-matrix.outputs.unity-matrix }} env: - # TEMPORARY: only run on Unity 2021 # Unity versions used in PRs - PR_UNITY_VERSIONS: '["2021.3"]' + PR_UNITY_VERSIONS: '["2022.3", "6000.3", "6000.5"]' # Unity versions used on main branch FULL_UNITY_VERSIONS: '["2021.3", "2022.3", "6000.0", "6000.3", "6000.5"]'