-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy pathproject-tests.yml
More file actions
53 lines (47 loc) · 2.99 KB
/
project-tests.yml
File metadata and controls
53 lines (47 loc) · 2.99 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
{% 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 executes project-specific tests in Unity Editor context
# Those tests cover both PlayMode and EditMode tests from project test assemblies
# NGO package tests are NOT being executed within this job (those are handled in separate package test jobs)
# CONFIGURATION STRUCTURE--------------------------------------------------------------
# Jobs configurations are generated using nested loops through:
# 1. For all projects WITH TESTS (filtered by has_tests flag) (testproject, testproject-tools-interation) [For more info look into project.metafile configuration]
# 2. For all desktop platforms (Windows, Ubuntu, macOS)
# 3. For all supported Unity Editor versions (for NGOv1.X this means 2022.3+ editors)
# TECHNICAL CONSIDERATIONS---------------------------------------------------------------
# This job runs in Editor context only (no player builds is required)
# No scripting backend variations needed (Editor context)
# Architecture variations not applicable (Editor context)
# Requires project packaging as prerequisite (dependency job)
# QUALITY CONSIDERATIONS--------------------------------------------------------------------
# TODO: Currently upm-ci is being used but in the future it will be replaced by upm-pvp
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
#------------------------------------------------------------------------------------
{% for project in projects.all -%}
{% if project.has_tests == "true" -%}
{% for platform in test_platforms.desktop -%}
{% for editor in validation_editors.all -%}
test_{{ project.name }}_{{ platform.name }}_{{ editor }}:
name : Project 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:
- unity-downloader-cli --fast --wait -u {{ editor }} -c Editor {% if platform.name == "mac" %} --arch arm64 {% endif %} # For macOS we use ARM64 models. Installing basic editor for tests execution
- UnifiedTestRunner --testproject={{ project.path }} --suite=editor --suite=playmode --artifacts-path=test-results --editor-location=.Editor --rerun-strategy=Test --retry={{ num_test_retries }} --clean-library-on-rerun --timeout={{ test_timeout }}
artifacts:
logs:
paths:
- "upm-ci~/test-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_ubuntu
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor -%}