|
| 1 | +{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file. |
| 2 | +--- |
| 3 | + |
| 4 | +# DESCRIPTION-------------------------------------------------------------------------- |
| 5 | + # This job validates NGO running against Netcode for Entities (N4E) through the unified API. |
| 6 | + # A "hybrid prefab" is an NGO prefab (NetworkObject at the root) that also carries a GhostObject. |
| 7 | + # When one or more hybrid prefabs are in the NetworkManager's prefab list, NGO hands transform |
| 8 | + # synchronization to N4E's snapshot system and tunnels its own batched messages over |
| 9 | + # UnifiedNetcodeTransport (N4E's out-of-band RPC) instead of using a NetworkTransport such as UTP. |
| 10 | + # UnifiedNetworkTransformTest is the validation test that this path works end to end. |
| 11 | + |
| 12 | +# WHY THIS JOB IS SEPARATE FROM EVERY OTHER JOB------------------------------------------ |
| 13 | + # 1. It needs an editor that bundles a com.unity.netcode with the unified API. That editor |
| 14 | + # (unified_editors.default in project.metafile) is not one of the validation_editors, and NGO |
| 15 | + # still has to keep building and testing against editors that have no unified API at all. |
| 16 | + # 2. It needs com.unity.netcode in the testproject so that the UNIFIED_NETCODE define is set |
| 17 | + # (see the versionDefines in Unity.Netcode.Runtime.asmdef). The committed |
| 18 | + # testproject/Packages/manifest.json deliberately does NOT reference it, so this job swaps in |
| 19 | + # testproject/Packages/manifest-unified.json instead. |
| 20 | + # 3. It is wired into pr_code_changes_checks and develop_nightly the same way the CMB service tests |
| 21 | + # are, so it runs automatically on PRs targeting develop / develop-3.x.x / release. Be aware that |
| 22 | + # this makes an unsupported alpha editor part of the PR gate: when N4E lands breaking changes in |
| 23 | + # trunk this job goes red and the pin has to be bumped to unblock PRs. |
| 24 | + # _triggers.yml also has unified_pr_checks, so it can be kicked off with "/ci unified" on PRs |
| 25 | + # that pr_code_changes_checks does not cover. |
| 26 | + |
| 27 | +# CONFIGURATION STRUCTURE-------------------------------------------------------------- |
| 28 | + # Jobs are generated using nested loops: |
| 29 | + # 1. For all unified test platforms (currently Ubuntu only, see project.metafile) |
| 30 | + # 2. For all unified editors (currently a single pinned alpha, see project.metafile) |
| 31 | + |
| 32 | +# TECHNICAL CONSIDERATIONS--------------------------------------------------------------- |
| 33 | + # This job runs in Editor context only (no player builds required), like project-tests.yml. |
| 34 | + # Only playmode is run: every unified test is an integration test and there are no unified EditMode tests. |
| 35 | + # The run is restricted to unified tests via unified_test_filter so that nothing else is exercised |
| 36 | + # on the alpha editor. Non-unified tests are covered by the regular jobs on the supported editors. |
| 37 | + # packages-lock.json is removed because the committed lock was resolved against a much older editor |
| 38 | + # and its builtin package versions do not exist in the unified editor. |
| 39 | + |
| 40 | +# QUALITY CONSIDERATIONS-------------------------------------------------------------------- |
| 41 | + # TODO: the manifest swap means testproject/Packages/manifest-unified.json has to be kept in sync |
| 42 | + # with manifest.json by hand. Revisit once N4E is a hard dependency of NGO and one manifest |
| 43 | + # can cover both cases. |
| 44 | + # TODO: unified_test_filter is a test-name pattern. Replacing it with an NUnit category (for |
| 45 | + # example [Category("Unified")]) would be less fragile once more fixtures gain unified variants. |
| 46 | + |
| 47 | +#------------------------------------------------------------------------------------ |
| 48 | + |
| 49 | +{% for project in projects.default -%} |
| 50 | +{% for platform in unified_test_platforms -%} |
| 51 | +{% for editor in unified_editors.default -%} |
| 52 | +unified_test_{{ project.name }}_{{ platform.name }}_{{ editor }}: |
| 53 | + name : Unified Test - NGO {{ project.name }} [{{ platform.name }}, {{ editor }}] |
| 54 | + agent: |
| 55 | + type: {{ platform.type }} |
| 56 | + image: {{ platform.image }} |
| 57 | + flavor: {{ platform.flavor }} |
| 58 | +{% if platform.model %} |
| 59 | + model: {{ platform.model }} # This is set only in platforms where we want non-default model to use (more information in project.metafile) |
| 60 | +{% endif %} |
| 61 | + commands: |
| 62 | + # Swap in the manifest that pulls in com.unity.netcode (N4E). This is what causes UNIFIED_NETCODE |
| 63 | + # to be defined and therefore what makes the unified tests compile at all. |
| 64 | + - cp {{ project.path }}/Packages/manifest-unified.json {{ project.path }}/Packages/manifest.json |
| 65 | + - unity-downloader-cli --fast --wait -u {{ editor }} -c Editor # Installing basic editor for tests execution |
| 66 | + - 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 }} |
| 67 | + artifacts: |
| 68 | + logs: |
| 69 | + paths: |
| 70 | + - "test-results/**/*" |
| 71 | + dependencies: |
| 72 | + - .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors |
| 73 | +{% endfor -%} |
| 74 | +{% endfor -%} |
| 75 | +{% endfor -%} |
0 commit comments