com.unity.multiplayer.sampl.../.yamato/tests.yml

43 строки
2.0 KiB
YAML

{% metadata_file .yamato/project.metafile %}
---
{% for project in projects -%}
{% for editor in project.test_editors -%}
{% for platform in test_platforms -%}
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
name: {{ project.name }} project tests - {{ editor }} on {{ platform.name }}
variables:
UTR_VERSION: current
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
{% if platform.name == "win" -%} #windows
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
{% if project.run_editor_tests -%} # Only run editor tests for projects where relevant
- utr --suite=editor --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% if project.run_playmode_tests -%} # Only run playmode tests for projects where relevant
- utr --suite=playmode --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% else -%}
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
- chmod +x utr
{% if project.run_editor_tests -%} # Only run editor tests for projects where relevant
- ./utr --suite=editor --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% if project.run_playmode_tests -%} # Only run playmode tests for projects where relevant
- ./utr --suite=playmode --editor-location=.Editor --testproject={{ project.path }} --testfilter={{ project.test_filter }} --artifacts-path=testlogs
{% endif -%}
{% endif -%}
artifacts:
logs:
paths:
- "testlogs/**"
{% endfor -%}
{% endfor -%}
{% endfor -%}