Skip to content

Commit 36111b2

Browse files
ci: [NGOv3.X] fixing issues around Standards check (#4098)
* Updated standards check editor * corrected jobs definition * missed one
1 parent ad36f93 commit 36111b2

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

.yamato/_run-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ run_quick_checks:
1616
name: Run Quick Initial Checks
1717
dependencies:
1818
# Ensure the code is running to our current standards
19-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
19+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
2020
# This is needed for most of the jobs to execute tests + it runs xray PVP checks (all fast checks)
2121
- .yamato/package-pack.yml#package_pack_-_ngo_win
2222

@@ -115,7 +115,7 @@ run_all_projects_standards:
115115
dependencies:
116116
{% for platform in test_platforms.default -%}
117117
{% for project in projects.all -%}
118-
{% for editor in validation_editors.default -%}
118+
{% for editor in validation_editors.standards -%}
119119
- .yamato/project-standards.yml#standards_{{ platform.name }}_{{ project.name }}_{{ editor }}
120120
{% endfor -%}
121121
{% endfor -%}

.yamato/_triggers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
pr_minimal_required_checks:
5252
name: Minimal PR checks
5353
dependencies:
54-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
54+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
5555
- .yamato/package-pack.yml#package_pack_-_ngo_win
5656
triggers:
5757
expression: |-
@@ -132,7 +132,7 @@ develop_nightly:
132132
rerun: always
133133
dependencies:
134134
# Run project standards to verify package/default project
135-
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.default }}
135+
- .yamato/project-standards.yml#standards_ubuntu_testproject_{{ validation_editors.standards }}
136136
# Run APV jobs to make sure the change won't break any dependants
137137
- .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs
138138
# Run package EditMode and Playmode tests on desktop platforms on trunk and 6000.0

.yamato/project-standards.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
{% for project in projects.all -%}
3232
{% for platform in test_platforms.default -%}
33-
{% for editor in validation_editors.default -%}
33+
{% for editor in validation_editors.standards -%}
3434
standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
3535
name: Standards Check - NGO {{ project.name }} [{{ platform.name }}, {{ editor }}]
3636
agent:
@@ -48,8 +48,7 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
4848
- unity-downloader-cli --fast --wait -u {{ editor }} -c editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Downloads basic editor
4949
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project
5050
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix # Auto-fix formatting issues
51-
- git checkout -- {{ project.path }}/Packages/manifest.json {{ project.path }}/Packages/packages-lock.json {{ project.path }}/ProjectSettings/ProjectVersion.txt 2>/dev/null || true # Restore files that Unity may have modified (we only want to check code formatting)
52-
- 'git diff --exit-code || (echo "ERROR: Code formatting issues found. Run dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix locally and commit the changes." && exit 1)' # Fail if formatter made any changes
51+
- 'git diff --exit-code || (echo "ERROR: Code formatting issues found. Run dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --fix locally and commit the changes. Note that dotnet version that was used in this check depends on the image that was used so local results may differ (see the first command of this job to know which dotnet version was used)" && exit 1)' # Fail if formatter made any changes
5352
{% endfor -%}
5453
{% endfor -%}
5554
{% endfor -%}

.yamato/project.metafile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ test_platforms:
176176
# EDITOR CONFIGURATIONS-------------------------------------------------------------------------------
177177
# Editors to be used for testing. NGOv2.X official support started from 6000.0 editor
178178
# TODO: When a new editor will be released it should be added to this list
179+
# standards editor is used for standards check so we won't get random manifest changes due to newer editor being used
179180

180181
validation_editors:
181182
default:
@@ -188,6 +189,8 @@ validation_editors:
188189
- 5fe7931aab8c4fff9274e15ef0800125c68b8d6a
189190
minimal:
190191
- 6000.0
192+
standards:
193+
- 6000.3.21f1
191194
pinnedTrunk: 5fe7931aab8c4fff9274e15ef0800125c68b8d6a
192195

193196

0 commit comments

Comments
 (0)