Skip to content

Commit e1bf212

Browse files
ci: Adding minimal supported editor specific tests and improving trigger jobs coverage (#3409)
This PR aims to add minimal supported editor (6000.0) specific tests so we can differentiate between those and trunk tests as well as adding more variations to PR trigger job. Additionally it introduces _**run_quick_checks**_ job that was added as a requirement for package_pack and project_pack jobs. It will run as a first check (also on PR trigger) to catch any basic errors (PVP and project standards) and ONLY IF this job will pass, the rest of PR trigger job dependencies will be executed. This way provides faster feedback loop for developers and allow to minimize resource usage when unnecessary Failing result may look like this ![image](https://github.com/user-attachments/assets/bc89acc7-1fad-4330-92df-407bef45c308) Where we can see that many jobs failed but in reality we can see that only PVP jobs failed and others were never executed and failed due to their dependencies ## Backport This is specific change to develop-2.0.0 branch but it's somewhat reflected in #3408
1 parent c632b13 commit e1bf212

File tree

4 files changed

+132
-42
lines changed

4 files changed

+132
-42
lines changed

.yamato/_run-all.yml

+76-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@
22
---
33

44
# DESCRIPTION--------------------------------------------------------------------------
5-
# Those jobs group together related test as dependencies to allow to easily manage running a given set of tests.
6-
# This enables efficient test execution for different validation scenarios
5+
# Those jobs group together related test as dependencies to allow to easily manage running a given set of tests.
6+
# This enables efficient test execution for different validation scenarios
77

88
# QUALITY CONSIDERATIONS---------------------------------------------------------------
9-
# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job.
9+
# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job.
1010

1111
#-----------------------------------------------------------------------------------
1212

13+
# This job runs the fastest checks (PVP and code standards)
14+
# This is mainly used to quickly validate the easy mistakes before for example running PR trigger jobs (see _triggers.yml)
15+
run_quick_checks:
16+
name: Run Quick Initial Checks
17+
dependencies:
18+
- .yamato/package-pack.yml#package_pack_-_ngo_ubuntu
19+
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
20+
21+
1322
# Runs all package tests
1423
run_all_package_tests:
1524
name: Run All Package Tests
@@ -31,6 +40,14 @@ run_all_package_tests_trunk:
3140
{% endfor -%}
3241
{% endfor -%}
3342

43+
# Runs all package tests on mimimum supported editor (6000.0 in case of NGOv2.X)
44+
run_all_package_tests_6000:
45+
name: Run All Package Tests [6000.0]
46+
dependencies:
47+
{% for platform in test_platforms.desktop -%}
48+
- .yamato/package-tests.yml#package_test_-_ngo_6000.0_{{ platform.name }}
49+
{% endfor -%}
50+
3451

3552
# Runs all projects tests
3653
run_all_project_tests:
@@ -61,6 +78,18 @@ run_all_project_tests_trunk:
6178
{% endif -%}
6279
{% endfor -%}
6380

81+
# Runs all projects tests on mimimum supported editor (6000.0 in case of NGOv2.X)
82+
run_all_project_tests_6000:
83+
name: Run All Project Tests [6000.0]
84+
dependencies:
85+
{% for project in projects.all -%}
86+
{% if project.has_tests == "true" -%}
87+
{% for platform in test_platforms.desktop -%}
88+
- .yamato/project-tests.yml#test_{{ project.name }}_{{ platform.name }}_6000.0
89+
{% endfor -%}
90+
{% endif -%}
91+
{% endfor -%}
92+
6493

6594
# Runs all project standards check
6695
run_all_projects_standards:
@@ -104,6 +133,18 @@ run_all_webgl_builds_trunk:
104133
{% endfor -%}
105134
{% endfor -%}
106135

136+
# Runs all WebGL builds on 6000.0 editor
137+
run_all_webgl_builds_6000:
138+
name: Run All WebGl Build [6000.0]
139+
dependencies:
140+
{% for project in projects.default -%}
141+
{% if platform.name != "mac" -%} # There is an error about "Light baking could not be started because no valid OpenCL device could be found". Tracked in MTT-11726
142+
{% for platform in test_platforms.desktop -%}
143+
- .yamato/webgl-build.yml#webgl_build_{{ project.name }}_{{ platform.name }}_6000.0
144+
{% endfor -%}
145+
{% endif -%}
146+
{% endfor -%}
147+
107148

108149
# Runs all Desktop tests
109150
run_all_project_tests_desktop_standalone:
@@ -134,6 +175,18 @@ run_all_project_tests_desktop_standalone_trunk:
134175
{% endfor -%}
135176
{% endfor -%}
136177

178+
# Runs all Desktop tests on mimimum supported editor (6000.0 in case of NGOv2.X)
179+
run_all_project_tests_desktop_standalone_6000:
180+
name: Run All Standalone Tests - Desktop [6000.0]
181+
dependencies:
182+
{% for project in projects.default -%}
183+
{% for platform in test_platforms.desktop -%}
184+
{% for backend in scripting_backends -%}
185+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_6000.0
186+
{% endfor -%}
187+
{% endfor -%}
188+
{% endfor -%}
189+
137190
# Runs all Mobile tests
138191
run_all_project_tests_mobile_standalone:
139192
name: Run All Standalone Tests - Mobile
@@ -159,6 +212,16 @@ run_all_project_tests_mobile_standalone_trunk:
159212
{% endfor -%}
160213
{% endfor -%}
161214

215+
# Runs all Mobile tests on mimimum supported editor (6000.0 in case of NGOv2.X)
216+
run_all_project_tests_mobile_standalone_6000:
217+
name: Run All Standalone Tests - Mobile [6000.0]
218+
dependencies:
219+
{% for project in projects.default -%}
220+
{% for platform in test_platforms.mobile_test -%}
221+
- .yamato/mobile-standalone-test.yml#mobile_standalone_test_{{ project.name }}_{{ platform.name }}_6000.0
222+
{% endfor -%}
223+
{% endfor -%}
224+
162225

163226
# Runs all Console tests
164227
run_all_project_tests_console_standalone:
@@ -184,3 +247,13 @@ run_all_project_tests_console_standalone_trunk:
184247
{% endfor -%}
185248
{% endfor -%}
186249
{% endfor -%}
250+
251+
# Runs all Console tests on mimimum supported editor (6000.0 in case of NGOv2.X)
252+
run_all_project_tests_console_standalone_6000:
253+
name: Run All Standalone Tests - Console [6000.0]
254+
dependencies:
255+
{% for project in projects.default -%}
256+
{% for platform in test_platforms.console_test -%}
257+
- .yamato/console-standalone-test.yml#console_standalone_test_{{ project.name }}_{{ platform.name }}_6000.0
258+
{% endfor -%}
259+
{% endfor -%}

.yamato/_triggers.yml

+53-39
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,61 @@
22
---
33

44
# DESCRIPTION--------------------------------------------------------------------------
5-
# This configuration defines three main CI trigger patterns:
6-
# 1. Pull Request Validation: Validation performed on PR basis
7-
# 2. Nightly Development: Test set run nightly (validates most important test cases)
8-
# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any suprises)
9-
# Each pattern represents different balance between validation depth, execution time and CI resource usage
5+
# This configuration defines three main CI trigger patterns:
6+
# 1. Pull Request Validation: Validation performed on PR basis
7+
# 2. Nightly Development: Test set run nightly (validates most important test cases)
8+
# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises)
9+
# Each pattern represents different balance between validation depth, execution time and CI resource usage
1010

1111
# TRIGGER PATTERNS-------------------------------------------------------------------
12-
# Pull Request:
13-
# This test validaes Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
14-
# Triggers on PRs to develop, develop-2.0.0, and release branches
15-
# Focuses on critical validation paths that we should validate before merging PRs
16-
# Cancels previous runs on new commits
17-
# Excludes draft PRs
12+
# Pull Request:
13+
# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
14+
# Triggers on PRs to develop, develop, and release branches
15+
# Focuses on critical validation paths that we should validate before merging PRs
16+
# Cancels previous runs on new commits
17+
# Excludes draft PRs
1818

19-
# Nightly:
20-
# This test validaes same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
21-
# Runs daily on develop-2.0.0 (local configuration)
22-
# Includes all test types but only on trunk. TODO: Add validation for minimum supported editor in nightly
23-
# Adds platform-specific and APV validation
19+
# Nightly:
20+
# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
21+
# Runs daily on develop (local configuration)
22+
# Includes all test types but only on trunk.
23+
# Adds platform-specific and APV validation
2424

25-
# Weekly:
26-
# This test validaes same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project
27-
# Runs across all supported editor versions
28-
# Includes code coverage analysis
29-
# Validates all projects and standards
25+
# Weekly:
26+
# This test validates same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project
27+
# Runs across all supported editor versions
28+
# Includes code coverage analysis
29+
# Validates all projects and standards
3030

3131
# CONFIGURATION STRUCTURE--------------------------------------------------------------
32-
# Jobs configurations are generated by ensuring that all dependencies are successful.
33-
# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets
32+
# Jobs configurations are generated by ensuring that all dependencies are successful.
33+
# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets
3434

3535
# QUALITY CONSIDERATIONS---------------------------------------------------------------
3636
# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job.
3737

3838

39-
4039
#-----------------------------------------------------------------------------------
4140

4241
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
42+
# In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions.
43+
# This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests.
44+
# This optimization allows to speed up feedback look for any "obvious" errors and save resources.
45+
# Since standards job is a part of initial checks it's not present as direct dependency here
4346
pull_request_trigger:
4447
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
4548
dependencies:
46-
# Run project standards to verify package/default project
47-
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
48-
# Run package EditMode and Playmode tests on desktop platforms on trunk
49+
# Run package EditMode and Playmode package tests on trunk
4950
- .yamato/_run-all.yml#run_all_package_tests_trunk
50-
# Run project EditMode and PLaymode tests on desktop platforms on trunk
51+
# Run package EditMode and Playmode package tests on minimum supported editor (6000.0 in case of NGOv2.X)
52+
- .yamato/_run-all.yml#run_all_package_tests_6000
53+
# Run project EditMode and PLaymode project tests on trunk
5154
- .yamato/_run-all.yml#run_all_project_tests_trunk
52-
# Run one standalone test to make sure there are no obvious issues with most common platform (for example --fail-on-assert option is not present with package/project tests)
53-
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_trunk
55+
# Run project EditMode and PLaymode project tests on minimum supported editor (6000.0 in case of NGOv2.X)
56+
- .yamato/_run-all.yml#run_all_project_tests_6000
57+
# Run standalone test with mixture of parameters to make sure there are no obvious issues with most common platform (for example --fail-on-assert option is not present with package/project tests). We run 2 different combinations with different platform/editor/scripting backend.
58+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_mac_il2cpp_trunk
59+
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_mono_6000.0
5460
triggers:
5561
cancel_old_ci: true
5662
pull_requests:
@@ -60,13 +66,13 @@ pull_request_trigger:
6066
- "develop-2.0.0"
6167
- "/release\/.*/"
6268
- drafts: false
63-
69+
6470

6571
# Run all tests on trunk on nightly basis.
6672
# Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds
6773
# Those tests are all running on trunk editor (since it's daily and running all of them would add a lot of overhead)
6874
develop_nightly:
69-
name: "\U0001F319 [Nightly] Run All Tests [Trunk]"
75+
name: "\U0001F319 [Nightly] Run All Tests [Trunk and 6000]"
7076
triggers:
7177
recurring:
7278
- branch: develop-2.0.0
@@ -75,22 +81,30 @@ develop_nightly:
7581
dependencies:
7682
# Run project standards to verify package/default project
7783
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
84+
- .yamato/project-standards.yml#standards_ubuntu_testproject_6000.0
7885
# Run APV jobs to make sure the change won't break any dependants
7986
- .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs
80-
# Run package EditMode and Playmode tests on desktop platforms on trunk
87+
# Run package EditMode and Playmode tests on desktop platforms on trunk and 6000.0
8188
- .yamato/_run-all.yml#run_all_package_tests_trunk
82-
# Run project EditMode and PLaymode tests on desktop platforms on trunk
89+
- .yamato/_run-all.yml#run_all_package_tests_6000
90+
# Run project EditMode and PLaymode tests on desktop platforms on trunk and 6000.0
8391
- .yamato/_run-all.yml#run_all_project_tests_trunk
84-
# Run Runtime tests on desktop players on trunk
92+
- .yamato/_run-all.yml#run_all_project_tests_6000
93+
# Run Runtime tests on desktop players on trunk and 6000.0 editors
8594
- .yamato/_run-all.yml#run_all_project_tests_desktop_standalone_trunk
86-
# Run Runtime tests on mobile players on trunk
95+
- .yamato/_run-all.yml#run_all_project_tests_desktop_standalone_6000
96+
# Run Runtime tests on mobile players on trunk and 6000.0 editors
8797
- .yamato/_run-all.yml#run_all_project_tests_mobile_standalone_trunk
88-
# Run Runtime tests on console players on trunk
98+
- .yamato/_run-all.yml#run_all_project_tests_mobile_standalone_6000
99+
# Run Runtime tests on console players on trunk and 6000.0 editors
89100
- .yamato/_run-all.yml#run_all_project_tests_console_standalone_trunk
90-
# Build player for webgl platform on trunk
101+
- .yamato/_run-all.yml#run_all_project_tests_console_standalone_6000
102+
# Build player for webgl platform on trunk and 6000.0 editors
91103
- .yamato/_run-all.yml#run_all_webgl_builds_trunk
92-
# Build player for webgl platform on trunk
104+
- .yamato/_run-all.yml#run_all_webgl_builds_6000
105+
# Build player for webgl platform on trunk and 6000.0 editors
93106
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_ubuntu_trunk
107+
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_6000.0
94108

95109

96110
# Run all tests on weekly bases

.yamato/package-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ package_test_-_ngo_{{ editor }}_{{ platform.name }}:
5454
- "upm-ci~/test-results/**/*"
5555
- "pvp-results/*"
5656
dependencies:
57+
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
5758
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
5859
{% endfor -%}
5960
{% endfor -%}

.yamato/project-pack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ project_pack_-_{{ project.name }}_{{ platform.name }}:
3535
commands:
3636
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm # upm-ci is not preinstalled on the image so we need to download it
3737
- upm-ci project pack --project-path {{ project.path }}
38+
dependencies:
39+
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
3840
artifacts:
3941
packages:
4042
paths:

0 commit comments

Comments
 (0)