diff --git a/.yamato/code-coverage.yml b/.yamato/code-coverage.yml index 0e2d499f8d..c0aa7e59fd 100644 --- a/.yamato/code-coverage.yml +++ b/.yamato/code-coverage.yml @@ -16,12 +16,13 @@ code_coverage_{{ platform.name }}_{{ editor }}: commands: - npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - unity-downloader-cli -u {{ editor }} -c Editor --fast --wait - - {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %} upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun" + - DISPLAY=:0 upm-ci package test -u {{ editor }} --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun" artifacts: logs: paths: - "upm-ci~/test-results/**/*" + - "upm-ci~/test-results/CoverageResults/**/*" dependencies: - - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }} + - .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}_upmCI {% endfor -%} {% endfor -%} \ No newline at end of file diff --git a/.yamato/package-pack.yml b/.yamato/package-pack.yml index a9ab902847..492c08ef78 100644 --- a/.yamato/package-pack.yml +++ b/.yamato/package-pack.yml @@ -25,4 +25,28 @@ package_pack_-_ngo_{{ platform.name }}: packages: paths: - "upm-ci~/**" +{% endfor -%} + + +# This is in essence the same job as the one above with the difference that upm-ci is used instead of upm-pvp +# The reason for using it is that I had some problems with Code Coverage which in its current form uses upm-ci but if we would use the other pack job (the one above) we would need to use upm-pvp +# I had some problems with getting it to work so as temporary solution I created this pack job which is used ONLY as a dependency of Code Coverage job (other jobs use the above definition of pack job) +# TODO: remove this job and utilize the above one for Code Coverage job. This is tracked in MTT-11383 +{% for platform in test_platforms.default -%} +{% for project in projects.default -%} +package_pack_-_ngo_{{ platform.name }}_upmCI: + name: Package Pack (legacy upm-ci) - NGO [{{ platform.name }}] + agent: + type: {{ platform.type }} + image: {{ platform.image }} + flavor: {{ platform.flavor }} + timeout: 0.25 + commands: + - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + - upm-ci project pack --project-path {{ project.path }} + artifacts: + packages: + paths: + - "upm-ci~/packages/**/*" +{% endfor -%} {% endfor -%} \ No newline at end of file diff --git a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs index 8e885ead97..f4a77abc4c 100644 --- a/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs @@ -1,4 +1,6 @@ +#if COM_UNITY_MODULES_ANIMATION || COM_UNITY_MODULES_PHYSICS || COM_UNITY_MODULES_PHYSICS2D using Unity.Netcode.Components; +#endif #if UNITY_UNET_PRESENT using Unity.Netcode.Transports.UNET; #endif diff --git a/com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs b/com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs index abbf1ddeb0..7b2126b39d 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs @@ -1793,7 +1793,7 @@ private bool CheckForStateChange(ref NetworkTransformState networkState, ref Tra #else var position = InLocalSpace ? transformToUse.localPosition : transformToUse.position; var rotation = InLocalSpace ? transformToUse.localRotation : transformToUse.rotation; - var positionThreshold = Vector3.one * PositionThreshold; + var positionThreshold = Vector3.one * PositionThreshold; var rotationThreshold = Vector3.one * RotAngleThreshold; #endif var rotAngles = rotation.eulerAngles; diff --git a/com.unity.netcode.gameobjects/TestHelpers/Runtime/Metrics/WaitForMetricValues.cs b/com.unity.netcode.gameobjects/TestHelpers/Runtime/Metrics/WaitForMetricValues.cs index 01013851a4..10e8c6b8c5 100644 --- a/com.unity.netcode.gameobjects/TestHelpers/Runtime/Metrics/WaitForMetricValues.cs +++ b/com.unity.netcode.gameobjects/TestHelpers/Runtime/Metrics/WaitForMetricValues.cs @@ -21,7 +21,7 @@ public WaitForMetricValues(IMetricDispatcher dispatcher, DirectionalMetricInfo d dispatcher.RegisterObserver(this); } - abstract public void Observe(MetricCollection collection); + public abstract void Observe(MetricCollection collection); public void AssertMetricValuesHaveNotBeenFound() { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MetricsDispatchTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MetricsDispatchTests.cs index e8a268cf91..6d1eb91789 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MetricsDispatchTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MetricsDispatchTests.cs @@ -3,8 +3,8 @@ using System.Collections; using NUnit.Framework; using Unity.Multiplayer.Tools.NetStats; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs index dce18644f3..31abcadd50 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs @@ -4,11 +4,10 @@ using System.Linq; using NUnit.Framework; using Unity.Multiplayer.Tools.MetricTypes; +using Unity.Netcode.TestHelpers.Runtime.Metrics; using UnityEngine; using UnityEngine.TestTools; -using Unity.Netcode.TestHelpers.Runtime.Metrics; - namespace Unity.Netcode.RuntimeTests.Metrics { internal class NetworkObjectMetricsTests : SingleClientMetricTestBase diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs index 640cee4615..11f38cea1b 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs @@ -3,8 +3,8 @@ using System.Linq; using NUnit.Framework; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs index a3fcf30b3f..cc08dcd5b7 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs @@ -4,10 +4,10 @@ using NUnit.Framework; using Unity.Collections; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs index 91c242b5fd..f02c0b2467 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs @@ -1,6 +1,5 @@ #if MULTIPLAYER_TOOLS #if MULTIPLAYER_TOOLS_1_0_0_PRE_7 - using System.Collections; using NUnit.Framework; using Unity.Collections; diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketMetricsTests.cs index 90707de0b8..b6bfd71bf9 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketMetricsTests.cs @@ -4,8 +4,8 @@ using NUnit.Framework; using Unity.Collections; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs index b2b186a6f6..f68d502597 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs @@ -4,8 +4,8 @@ using NUnit.Framework; using Unity.Collections; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RttMetricsTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RttMetricsTests.cs index 2c77c66f3a..3a1a2ca2d4 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RttMetricsTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RttMetricsTests.cs @@ -7,9 +7,9 @@ using NUnit.Framework; using Unity.Collections; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs index 4fbd75fe36..758d7aa114 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs @@ -5,8 +5,8 @@ using NUnit.Framework; using Unity.Collections; using Unity.Multiplayer.Tools.MetricTypes; -using UnityEngine.TestTools; using Unity.Netcode.TestHelpers.Runtime.Metrics; +using UnityEngine.TestTools; namespace Unity.Netcode.RuntimeTests.Metrics { diff --git a/minimalproject/Packages/manifest.json b/minimalproject/Packages/manifest.json index b01ba5d497..c7c27fc5e9 100644 --- a/minimalproject/Packages/manifest.json +++ b/minimalproject/Packages/manifest.json @@ -1,5 +1,6 @@ { "dependencies": { + "com.unity.ide.rider": "3.0.34", "com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects" }, "testables": [ diff --git a/testproject-tools-integration/Assets/Tests/Runtime/SceneEventTests.cs b/testproject-tools-integration/Assets/Tests/Runtime/SceneEventTests.cs index c5d5a17812..eccaf57490 100644 --- a/testproject-tools-integration/Assets/Tests/Runtime/SceneEventTests.cs +++ b/testproject-tools-integration/Assets/Tests/Runtime/SceneEventTests.cs @@ -5,10 +5,10 @@ using NUnit.Framework; using Unity.Multiplayer.Tools.MetricTypes; using Unity.Netcode; +using Unity.Netcode.TestHelpers.Runtime; using Unity.Netcode.TestHelpers.Runtime.Metrics; using UnityEngine.SceneManagement; using UnityEngine.TestTools; -using Unity.Netcode.TestHelpers.Runtime; using SceneEventType = Unity.Netcode.SceneEventType; namespace TestProject.ToolsIntegration.RuntimeTests diff --git a/testproject-tools-integration/Packages/manifest.json b/testproject-tools-integration/Packages/manifest.json index d0841aedff..a3f60bc15a 100644 --- a/testproject-tools-integration/Packages/manifest.json +++ b/testproject-tools-integration/Packages/manifest.json @@ -1,8 +1,8 @@ { - "registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates", "dependencies": { "com.unity.ai.navigation": "2.0.5", - "com.unity.ide.rider": "3.0.31", + "com.unity.ide.rider": "3.0.34", + "com.unity.ide.visualstudio": "2.0.22", "com.unity.multiplayer.center": "1.0.0", "com.unity.multiplayer.tools": "2.2.3", "com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects", diff --git a/testproject-tools-integration/Packages/packages-lock.json b/testproject-tools-integration/Packages/packages-lock.json index 126b02a19b..76d63d3876 100644 --- a/testproject-tools-integration/Packages/packages-lock.json +++ b/testproject-tools-integration/Packages/packages-lock.json @@ -7,52 +7,61 @@ "dependencies": { "com.unity.modules.ai": "1.0.0" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.burst": { - "version": "1.8.19", - "depth": 2, + "version": "1.8.18", + "depth": 1, "source": "registry", "dependencies": { "com.unity.mathematics": "1.2.1", "com.unity.modules.jsonserialize": "1.0.0" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.collections": { "version": "2.5.1", - "depth": 2, + "depth": 1, "source": "registry", "dependencies": { "com.unity.burst": "1.8.17", - "com.unity.nuget.mono-cecil": "1.11.4", "com.unity.test-framework": "1.4.5", + "com.unity.nuget.mono-cecil": "1.11.4", "com.unity.test-framework.performance": "3.0.3" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.ext.nunit": { "version": "2.0.5", "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.31", + "version": "3.0.34", "depth": 0, "source": "registry", "dependencies": { "com.unity.ext.nunit": "1.0.6" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" + }, + "com.unity.ide.visualstudio": { + "version": "2.0.22", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.9" + }, + "url": "https://packages.unity.com" }, "com.unity.mathematics": { "version": "1.3.2", - "depth": 2, + "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.multiplayer.center": { "version": "1.0.0", @@ -63,17 +72,19 @@ } }, "com.unity.multiplayer.tools": { - "version": "https://github.com/Unity-Technologies/com.unity.multiplayer.tools.git#f935904741c349dc41ba24fda6639041128e8f19", + "version": "2.2.3", "depth": 0, - "source": "git", + "source": "registry", "dependencies": { - "com.unity.profiling.core": "1.0.0-pre.1", - "com.unity.nuget.newtonsoft-json": "2.0.0", - "com.unity.nuget.mono-cecil": "1.10.1", - "com.unity.collections": "1.1.0", - "com.unity.modules.uielements": "1.0.0" + "com.unity.burst": "1.8.18", + "com.unity.collections": "2.5.1", + "com.unity.mathematics": "1.3.2", + "com.unity.profiling.core": "1.0.2", + "com.unity.nuget.mono-cecil": "1.11.4", + "com.unity.modules.uielements": "1.0.0", + "com.unity.nuget.newtonsoft-json": "3.2.1" }, - "hash": "f935904741c349dc41ba24fda6639041128e8f19" + "url": "https://packages.unity.com" }, "com.unity.netcode.gameobjects": { "version": "file:../../com.unity.netcode.gameobjects", @@ -89,7 +100,21 @@ "depth": 1, "source": "registry", "dependencies": {}, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" + }, + "com.unity.nuget.newtonsoft-json": { + "version": "3.2.1", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.profiling.core": { + "version": "1.0.2", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" }, "com.unity.test-framework": { "version": "1.4.6", @@ -100,7 +125,7 @@ "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.test-framework.performance": { "version": "3.0.3", @@ -110,18 +135,18 @@ "com.unity.test-framework": "1.1.31", "com.unity.modules.jsonserialize": "1.0.0" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.transport": { "version": "2.4.0", "depth": 1, "source": "registry", "dependencies": { - "com.unity.collections": "2.2.1", "com.unity.burst": "1.8.12", + "com.unity.collections": "2.2.1", "com.unity.mathematics": "1.3.1" }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + "url": "https://packages.unity.com" }, "com.unity.modules.accessibility": { "version": "1.0.0",