-
Notifications
You must be signed in to change notification settings - Fork 461
chore: enable unified hybrid tests #4122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6a07afb
b0c8a3c
7547269
319d7eb
9e8b6bb
93a7d71
aec318d
5afa312
f848329
3f0a970
4b32172
ddd520a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,7 @@ pr_code_changes_checks: | |
| # Note that our daily tests will anyway run both test configurations in "minimal supported" and "trunk" configurations | ||
| - .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_{{ pinnedTrunk }} | ||
| - .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_{{ pinnedTrunk }} | ||
| - .yamato/_run-all.yml#run_all_unified_tests | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So those tests are not included by default in any other job? Like usual package tests?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| # Run code coverage test (PRs use the pinned "safe" trunk) | ||
| - .yamato/code-coverage.yml#code_coverage_project_test_testproject_ubuntu_{{ pinnedTrunk }} | ||
| triggers: | ||
|
|
@@ -120,6 +121,19 @@ pr_code_changes_checks: | |
|
|
||
|
|
||
|
|
||
| # Unified (NGO + N4E) validation, on demand. | ||
| # This job allows the Unified tests to be kicked off by commenting "/ci unified". | ||
| # This is useful for PRs where pr_code_changes_checks doesn't trigger. | ||
| unified_pr_checks: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if we really need this part if those tests will run on each PR anyway (part of
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The triggers are removed in #4137 |
||
| name: Unified (NGO + N4E) checks [on demand] | ||
| dependencies: | ||
| - .yamato/_run-all.yml#run_all_unified_tests | ||
| triggers: | ||
| expression: |- | ||
| pull_request.comment eq "unified" | ||
| cancel_old_ci: true | ||
|
|
||
|
|
||
| # Run all tests on nightly basis. | ||
| # Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds | ||
| # Those tests are all running on trunk and the default editor (since it's daily and running all of them would add a lot of overhead) | ||
|
|
@@ -156,6 +170,8 @@ develop_nightly: | |
| # Run Runtime tests against cmb service on trunk and default editors | ||
| - .yamato/_run-all.yml#run_all_project_tests_cmb_service_trunk | ||
| - .yamato/_run-all.yml#run_all_project_tests_cmb_service_default | ||
| # Run the unified (NGO + N4E) tests on their own pinned editor (see .yamato/unified-tests.yml) | ||
| - .yamato/_run-all.yml#run_all_unified_tests | ||
|
EmandM marked this conversation as resolved.
|
||
| # Build player for webgl platform on trunk and default editors | ||
| - .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_ubuntu_trunk | ||
| - .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_{{ validation_editors.default }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| {% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. | ||
| --- | ||
|
|
||
| # DESCRIPTION-------------------------------------------------------------------------- | ||
| # This job validates NGO running against Netcode for Entities (N4E) through the unified API. | ||
| # A "hybrid prefab" is an NGO prefab (NetworkObject at the root) that also carries a GhostObject. | ||
| # When one or more hybrid prefabs are in the NetworkManager's prefab list, NGO hands transform | ||
| # synchronization to N4E's snapshot system and tunnels its own batched messages over | ||
| # UnifiedNetcodeTransport (N4E's out-of-band RPC) instead of using a NetworkTransport such as UTP. | ||
| # UnifiedNetworkTransformTest is the validation test that this path works end to end. | ||
|
|
||
| # WHY THIS JOB IS SEPARATE FROM EVERY OTHER JOB------------------------------------------ | ||
| # 1. It needs an editor that bundles a com.unity.netcode with the unified API. That editor | ||
| # (unified_editors.default in project.metafile) is not one of the validation_editors, and NGO | ||
| # still has to keep building and testing against editors that have no unified API at all. | ||
| # 2. It needs com.unity.netcode in the testproject so that the UNIFIED_NETCODE define is set | ||
| # (see the versionDefines in Unity.Netcode.Runtime.asmdef). The committed | ||
| # testproject/Packages/manifest.json deliberately does NOT reference it, so this job swaps in | ||
| # testproject/Packages/manifest-unified.json instead. | ||
| # 3. It is wired into pr_code_changes_checks and develop_nightly the same way the CMB service tests | ||
| # are, so it runs automatically on PRs targeting develop / develop-3.x.x / release. Be aware that | ||
| # this makes an unsupported alpha editor part of the PR gate: when N4E lands breaking changes in | ||
| # trunk this job goes red and the pin has to be bumped to unblock PRs. | ||
| # _triggers.yml also has unified_pr_checks, so it can be kicked off with "/ci unified" on PRs | ||
| # that pr_code_changes_checks does not cover. | ||
|
|
||
| # CONFIGURATION STRUCTURE-------------------------------------------------------------- | ||
| # Jobs are generated using nested loops: | ||
| # 1. For all unified test platforms (currently Ubuntu only, see project.metafile) | ||
| # 2. For all unified editors (currently a single pinned alpha, see project.metafile) | ||
|
|
||
| # TECHNICAL CONSIDERATIONS--------------------------------------------------------------- | ||
| # This job runs in Editor context only (no player builds required), like project-tests.yml. | ||
| # Only playmode is run: every unified test is an integration test and there are no unified EditMode tests. | ||
| # The run is restricted to unified tests via unified_test_filter so that nothing else is exercised | ||
| # on the alpha editor. Non-unified tests are covered by the regular jobs on the supported editors. | ||
| # packages-lock.json is removed because the committed lock was resolved against a much older editor | ||
| # and its builtin package versions do not exist in the unified editor. | ||
|
|
||
| # QUALITY CONSIDERATIONS-------------------------------------------------------------------- | ||
| # TODO: the manifest swap means testproject/Packages/manifest-unified.json has to be kept in sync | ||
| # with manifest.json by hand. Revisit once N4E is a hard dependency of NGO and one manifest | ||
| # can cover both cases. | ||
| # TODO: unified_test_filter is a test-name pattern. Replacing it with an NUnit category (for | ||
| # example [Category("Unified")]) would be less fragile once more fixtures gain unified variants. | ||
|
|
||
| #------------------------------------------------------------------------------------ | ||
|
|
||
| {% for project in projects.default -%} | ||
| {% for platform in unified_test_platforms -%} | ||
| {% for editor in unified_editors.default -%} | ||
| unified_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: | ||
| name : Unified Test - NGO {{ project.name }} [{{ platform.name }}, {{ editor }}] | ||
| agent: | ||
| type: {{ platform.type }} | ||
| image: {{ platform.image }} | ||
| flavor: {{ platform.flavor }} | ||
| {% if platform.model %} | ||
| model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) | ||
| {% endif %} | ||
| commands: | ||
| # Swap in the manifest that pulls in com.unity.netcode (N4E). This is what causes UNIFIED_NETCODE | ||
| # to be defined and therefore what makes the unified tests compile at all. | ||
| - cp {{ project.path }}/Packages/manifest-unified.json {{ project.path }}/Packages/manifest.json | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we can't update our current manifest already? Would it require to move completely to testing on 6000.7?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah... it would require us to remove all of the earlier editor versions. But based on yesterday's conversation we might hold off in case we decide to support 6000.3.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with merging this as it's now and then we will adjust once we switch compleately to 6000.7 |
||
| - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for tests execution | ||
| - UnifiedTestRunner --testproject={{ project.path }} --suite=playmode --artifacts-path=test-results --editor-location=.Editor --testfilter="{{ unified_test_filter }}" --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we only support PlayMode tests? (otherwise it would be |
||
| artifacts: | ||
| logs: | ||
| paths: | ||
| - "test-results/**/*" | ||
| dependencies: | ||
| - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors | ||
| {% endfor -%} | ||
| {% endfor -%} | ||
| {% endfor -%} | ||
Uh oh!
There was an error while loading. Please reload this page.