-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy pathpackage-tests.yml
More file actions
60 lines (52 loc) · 3.52 KB
/
package-tests.yml
File metadata and controls
60 lines (52 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{% 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 is responsible for execution of package-specific tests in Unity Editor context
# Those tests cover both PlayMode and EditMode tests from package test assemblies
# Additionally it combines Package Verification Pipeline (PVP) validation. This ensures that package is compatible with Unity standards
# CONFIGURATION STRUCTURE--------------------------------------------------------------
# Jobs are generated using nested loops through:
# 1. For all desktop platforms (Windows, Ubuntu, macOS)
# 2. For all supported Unity Editor versions (for NGOv1.X this means 2021.3+ editors)
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# This job runs in Editor context only (no player builds required)
# No scripting backend variations needed (Editor context)
# Architecture variations not applicable (Editor context)
# Requires project packaging as prerequisite (dependency job)
# Uses PVP for package validation. Specifically it looks for supported profiles which we should conform to but takes ./pvpExceptions.json file into consideration where we note our known issues related to PVP checks
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
# TODO: we should aim to replace target PVP profile from supported to gold
#------------------------------------------------------------------------------------
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
package_test_-_ngo_{{ editor }}_{{ platform.name }}:
name : Package Test - NGO [{{ 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 %}
variables:
XRAY_PROFILE: "supported ./pvpExceptions.json"
UNITY_EXT_LOGGING: 1
commands:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models.
# Validate PVP checks for package.
- upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --results pvp-results
- upm-pvp require {% if platform.name == "win" %}"%XRAY_PROFILE%"{% else %}"$XRAY_PROFILE"{% endif %} --results pvp-results
# Run UTR to test packages.
- upm-pvp create-test-project test-project --packages "upm-ci~/packages/*.tgz" --filter "com.unity.netcode.gameobjects" --unity .Editor
- UnifiedTestRunner --suite=editor --suite=playmode --editor-location=.Editor --testproject=test-project --artifacts-path=test-results "--ff={ops.upmpvpevidence.enable=true}" --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
- "pvp-results/*"
dependencies:
- .yamato/_run-all.yml#run_quick_checks # initial checks to perform fast validation of common errors
- .yamato/package-pack.yml#package_pack_-_ngo_{{ platform.name }}
{% endfor -%}
{% endfor -%}