Skip to content

Commit 84c06c7

Browse files
ci: [2.X] CI failures fixes (#3302)
This PR addresses some test failures in new CI definition (present on develop-2.0.0 branch) 1. **Code Coverage test failure** --> This test was failing because packed package couldn't be find. This steams from the fact that the path was wrongly pointing to different place because package pack job was modified to fix this. 2. **minimalproject standards failure** --> We were focusing before on making sure that testproject is conforming to standards (which also means that NGO package conforms to standards) but minimalproject has few errors which we aim to fix in this PR 3. **testproject-tools-integration standards failure** --> We were focusing before on making sure that testproject is conforming to standards (which also means that NGO package conforms to standards) but testproject-tools-integration has few errors which we aim to fix in this PR --------- Co-authored-by: NoelStephensUnity <[email protected]>
1 parent 6ecfcc1 commit 84c06c7

File tree

18 files changed

+94
-43
lines changed

18 files changed

+94
-43
lines changed

.yamato/code-coverage.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ code_coverage_{{ platform.name }}_{{ editor }}:
1616
commands:
1717
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1818
- unity-downloader-cli -u {{ editor }} -c Editor --fast --wait
19-
- {% 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"
19+
- 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"
2020
artifacts:
2121
logs:
2222
paths:
2323
- "upm-ci~/test-results/**/*"
24+
- "upm-ci~/test-results/CoverageResults/**/*"
2425
dependencies:
25-
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
26+
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}_upmCI
2627
{% endfor -%}
2728
{% endfor -%}

.yamato/package-pack.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,28 @@ package_pack_-_ngo_{{ platform.name }}:
2525
packages:
2626
paths:
2727
- "upm-ci~/**"
28+
{% endfor -%}
29+
30+
31+
# This is in essence the same job as the one above with the difference that upm-ci is used instead of upm-pvp
32+
# 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
33+
# 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)
34+
# TODO: remove this job and utilize the above one for Code Coverage job. This is tracked in MTT-11383
35+
{% for platform in test_platforms.default -%}
36+
{% for project in projects.default -%}
37+
package_pack_-_ngo_{{ platform.name }}_upmCI:
38+
name: Package Pack (legacy upm-ci) - NGO [{{ platform.name }}]
39+
agent:
40+
type: {{ platform.type }}
41+
image: {{ platform.image }}
42+
flavor: {{ platform.flavor }}
43+
timeout: 0.25
44+
commands:
45+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
46+
- upm-ci project pack --project-path {{ project.path }}
47+
artifacts:
48+
packages:
49+
paths:
50+
- "upm-ci~/packages/**/*"
51+
{% endfor -%}
2852
{% endfor -%}

com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
#if COM_UNITY_MODULES_ANIMATION || COM_UNITY_MODULES_PHYSICS || COM_UNITY_MODULES_PHYSICS2D
12
using Unity.Netcode.Components;
3+
#endif
24
#if UNITY_UNET_PRESENT
35
using Unity.Netcode.Transports.UNET;
46
#endif

com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ private bool CheckForStateChange(ref NetworkTransformState networkState, ref Tra
17931793
#else
17941794
var position = InLocalSpace ? transformToUse.localPosition : transformToUse.position;
17951795
var rotation = InLocalSpace ? transformToUse.localRotation : transformToUse.rotation;
1796-
var positionThreshold = Vector3.one * PositionThreshold;
1796+
var positionThreshold = Vector3.one * PositionThreshold;
17971797
var rotationThreshold = Vector3.one * RotAngleThreshold;
17981798
#endif
17991799
var rotAngles = rotation.eulerAngles;

com.unity.netcode.gameobjects/TestHelpers/Runtime/Metrics/WaitForMetricValues.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public WaitForMetricValues(IMetricDispatcher dispatcher, DirectionalMetricInfo d
2121
dispatcher.RegisterObserver(this);
2222
}
2323

24-
abstract public void Observe(MetricCollection collection);
24+
public abstract void Observe(MetricCollection collection);
2525

2626
public void AssertMetricValuesHaveNotBeenFound()
2727
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MetricsDispatchTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Collections;
44
using NUnit.Framework;
55
using Unity.Multiplayer.Tools.NetStats;
6-
using UnityEngine.TestTools;
76
using Unity.Netcode.TestHelpers.Runtime;
7+
using UnityEngine.TestTools;
88

99
namespace Unity.Netcode.RuntimeTests.Metrics
1010
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
using System.Linq;
55
using NUnit.Framework;
66
using Unity.Multiplayer.Tools.MetricTypes;
7+
using Unity.Netcode.TestHelpers.Runtime.Metrics;
78
using UnityEngine;
89
using UnityEngine.TestTools;
910

10-
using Unity.Netcode.TestHelpers.Runtime.Metrics;
11-
1211
namespace Unity.Netcode.RuntimeTests.Metrics
1312
{
1413
internal class NetworkObjectMetricsTests : SingleClientMetricTestBase

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Linq;
44
using NUnit.Framework;
55
using Unity.Multiplayer.Tools.MetricTypes;
6-
using UnityEngine.TestTools;
76
using Unity.Netcode.TestHelpers.Runtime.Metrics;
7+
using UnityEngine.TestTools;
88

99
namespace Unity.Netcode.RuntimeTests.Metrics
1010
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
using NUnit.Framework;
55
using Unity.Collections;
66
using Unity.Multiplayer.Tools.MetricTypes;
7-
using UnityEngine;
8-
using UnityEngine.TestTools;
97
using Unity.Netcode.TestHelpers.Runtime;
108
using Unity.Netcode.TestHelpers.Runtime.Metrics;
9+
using UnityEngine;
10+
using UnityEngine.TestTools;
1111

1212
namespace Unity.Netcode.RuntimeTests.Metrics
1313
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#if MULTIPLAYER_TOOLS
22
#if MULTIPLAYER_TOOLS_1_0_0_PRE_7
3-
43
using System.Collections;
54
using NUnit.Framework;
65
using Unity.Collections;

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketMetricsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using NUnit.Framework;
55
using Unity.Collections;
66
using Unity.Multiplayer.Tools.MetricTypes;
7-
using UnityEngine.TestTools;
87
using Unity.Netcode.TestHelpers.Runtime.Metrics;
8+
using UnityEngine.TestTools;
99

1010
namespace Unity.Netcode.RuntimeTests.Metrics
1111
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using NUnit.Framework;
55
using Unity.Collections;
66
using Unity.Multiplayer.Tools.MetricTypes;
7-
using UnityEngine.TestTools;
87
using Unity.Netcode.TestHelpers.Runtime.Metrics;
8+
using UnityEngine.TestTools;
99

1010
namespace Unity.Netcode.RuntimeTests.Metrics
1111
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RttMetricsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
using NUnit.Framework;
88
using Unity.Collections;
99
using Unity.Multiplayer.Tools.MetricTypes;
10-
using UnityEngine.TestTools;
1110
using Unity.Netcode.TestHelpers.Runtime;
1211
using Unity.Netcode.TestHelpers.Runtime.Metrics;
12+
using UnityEngine.TestTools;
1313

1414
namespace Unity.Netcode.RuntimeTests.Metrics
1515
{

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
using NUnit.Framework;
66
using Unity.Collections;
77
using Unity.Multiplayer.Tools.MetricTypes;
8-
using UnityEngine.TestTools;
98
using Unity.Netcode.TestHelpers.Runtime.Metrics;
9+
using UnityEngine.TestTools;
1010

1111
namespace Unity.Netcode.RuntimeTests.Metrics
1212
{

minimalproject/Packages/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": {
3+
"com.unity.ide.rider": "3.0.34",
34
"com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects"
45
},
56
"testables": [

testproject-tools-integration/Assets/Tests/Runtime/SceneEventTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
using NUnit.Framework;
66
using Unity.Multiplayer.Tools.MetricTypes;
77
using Unity.Netcode;
8+
using Unity.Netcode.TestHelpers.Runtime;
89
using Unity.Netcode.TestHelpers.Runtime.Metrics;
910
using UnityEngine.SceneManagement;
1011
using UnityEngine.TestTools;
11-
using Unity.Netcode.TestHelpers.Runtime;
1212
using SceneEventType = Unity.Netcode.SceneEventType;
1313

1414
namespace TestProject.ToolsIntegration.RuntimeTests

testproject-tools-integration/Packages/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"registry": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates",
32
"dependencies": {
43
"com.unity.ai.navigation": "2.0.5",
5-
"com.unity.ide.rider": "3.0.31",
4+
"com.unity.ide.rider": "3.0.34",
5+
"com.unity.ide.visualstudio": "2.0.22",
66
"com.unity.multiplayer.center": "1.0.0",
77
"com.unity.multiplayer.tools": "2.2.3",
88
"com.unity.netcode.gameobjects": "file:../../com.unity.netcode.gameobjects",

testproject-tools-integration/Packages/packages-lock.json

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,61 @@
77
"dependencies": {
88
"com.unity.modules.ai": "1.0.0"
99
},
10-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
10+
"url": "https://packages.unity.com"
1111
},
1212
"com.unity.burst": {
13-
"version": "1.8.19",
14-
"depth": 2,
13+
"version": "1.8.18",
14+
"depth": 1,
1515
"source": "registry",
1616
"dependencies": {
1717
"com.unity.mathematics": "1.2.1",
1818
"com.unity.modules.jsonserialize": "1.0.0"
1919
},
20-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
20+
"url": "https://packages.unity.com"
2121
},
2222
"com.unity.collections": {
2323
"version": "2.5.1",
24-
"depth": 2,
24+
"depth": 1,
2525
"source": "registry",
2626
"dependencies": {
2727
"com.unity.burst": "1.8.17",
28-
"com.unity.nuget.mono-cecil": "1.11.4",
2928
"com.unity.test-framework": "1.4.5",
29+
"com.unity.nuget.mono-cecil": "1.11.4",
3030
"com.unity.test-framework.performance": "3.0.3"
3131
},
32-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
32+
"url": "https://packages.unity.com"
3333
},
3434
"com.unity.ext.nunit": {
3535
"version": "2.0.5",
3636
"depth": 1,
3737
"source": "registry",
3838
"dependencies": {},
39-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
39+
"url": "https://packages.unity.com"
4040
},
4141
"com.unity.ide.rider": {
42-
"version": "3.0.31",
42+
"version": "3.0.34",
4343
"depth": 0,
4444
"source": "registry",
4545
"dependencies": {
4646
"com.unity.ext.nunit": "1.0.6"
4747
},
48-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
48+
"url": "https://packages.unity.com"
49+
},
50+
"com.unity.ide.visualstudio": {
51+
"version": "2.0.22",
52+
"depth": 0,
53+
"source": "registry",
54+
"dependencies": {
55+
"com.unity.test-framework": "1.1.9"
56+
},
57+
"url": "https://packages.unity.com"
4958
},
5059
"com.unity.mathematics": {
5160
"version": "1.3.2",
52-
"depth": 2,
61+
"depth": 1,
5362
"source": "registry",
5463
"dependencies": {},
55-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
64+
"url": "https://packages.unity.com"
5665
},
5766
"com.unity.multiplayer.center": {
5867
"version": "1.0.0",
@@ -63,17 +72,19 @@
6372
}
6473
},
6574
"com.unity.multiplayer.tools": {
66-
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.tools.git#f935904741c349dc41ba24fda6639041128e8f19",
75+
"version": "2.2.3",
6776
"depth": 0,
68-
"source": "git",
77+
"source": "registry",
6978
"dependencies": {
70-
"com.unity.profiling.core": "1.0.0-pre.1",
71-
"com.unity.nuget.newtonsoft-json": "2.0.0",
72-
"com.unity.nuget.mono-cecil": "1.10.1",
73-
"com.unity.collections": "1.1.0",
74-
"com.unity.modules.uielements": "1.0.0"
79+
"com.unity.burst": "1.8.18",
80+
"com.unity.collections": "2.5.1",
81+
"com.unity.mathematics": "1.3.2",
82+
"com.unity.profiling.core": "1.0.2",
83+
"com.unity.nuget.mono-cecil": "1.11.4",
84+
"com.unity.modules.uielements": "1.0.0",
85+
"com.unity.nuget.newtonsoft-json": "3.2.1"
7586
},
76-
"hash": "f935904741c349dc41ba24fda6639041128e8f19"
87+
"url": "https://packages.unity.com"
7788
},
7889
"com.unity.netcode.gameobjects": {
7990
"version": "file:../../com.unity.netcode.gameobjects",
@@ -89,7 +100,21 @@
89100
"depth": 1,
90101
"source": "registry",
91102
"dependencies": {},
92-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
103+
"url": "https://packages.unity.com"
104+
},
105+
"com.unity.nuget.newtonsoft-json": {
106+
"version": "3.2.1",
107+
"depth": 1,
108+
"source": "registry",
109+
"dependencies": {},
110+
"url": "https://packages.unity.com"
111+
},
112+
"com.unity.profiling.core": {
113+
"version": "1.0.2",
114+
"depth": 1,
115+
"source": "registry",
116+
"dependencies": {},
117+
"url": "https://packages.unity.com"
93118
},
94119
"com.unity.test-framework": {
95120
"version": "1.4.6",
@@ -100,7 +125,7 @@
100125
"com.unity.modules.imgui": "1.0.0",
101126
"com.unity.modules.jsonserialize": "1.0.0"
102127
},
103-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
128+
"url": "https://packages.unity.com"
104129
},
105130
"com.unity.test-framework.performance": {
106131
"version": "3.0.3",
@@ -110,18 +135,18 @@
110135
"com.unity.test-framework": "1.1.31",
111136
"com.unity.modules.jsonserialize": "1.0.0"
112137
},
113-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
138+
"url": "https://packages.unity.com"
114139
},
115140
"com.unity.transport": {
116141
"version": "2.4.0",
117142
"depth": 1,
118143
"source": "registry",
119144
"dependencies": {
120-
"com.unity.collections": "2.2.1",
121145
"com.unity.burst": "1.8.12",
146+
"com.unity.collections": "2.2.1",
122147
"com.unity.mathematics": "1.3.1"
123148
},
124-
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
149+
"url": "https://packages.unity.com"
125150
},
126151
"com.unity.modules.accessibility": {
127152
"version": "1.0.0",

0 commit comments

Comments
 (0)