@@ -29,20 +29,23 @@ test_platforms:
2929 type : Unity::VM
3030 image : package-ci/ubuntu:stable
3131 flavor : b1.medium
32+ packages :
33+ - name : com.unity.ml-agents
34+ - name : com.unity.ml-agents.extensions
3235---
3336
3437all_package_tests :
3538 name : Run All Combinations of Editors/Platforms Tests
3639 dependencies :
3740 {% for editor in test_editors %}
3841 {% for platform in test_platforms %}
39- - .yamato/com.unity.ml-agents-test.yml#test_ {{ platform.name }}_{{ editor.version }}
42+ - .yamato/com.unity.ml-agents-test.yml#test_com.unity.ml-agents_ {{ platform.name }}_{{ editor.version }}
4043 {% endfor %}
4144 {% endfor %}
4245
4346 {% for editor in trunk_editor %}
4447 {% for platform in test_platforms %}
45- - .yamato/com.unity.ml-agents-test.yml#test_ {{ platform.name }}_{{ editor.version }}
48+ - .yamato/com.unity.ml-agents-test.yml#test_com.unity.ml-agents_ {{ platform.name }}_{{ editor.version }}
4649 {% endfor %}
4750 {% endfor %}
4851 triggers :
@@ -51,18 +54,23 @@ all_package_tests:
5154 - branch : master
5255 frequency : daily
5356
54- {% for editor in test_editors %}
55- {% for platform in test_platforms %}
56- test_{{ platform.name }}_{{ editor.version }} :
57- name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
57+ {% for package in packages %}
58+ {% for editor in test_editors %}
59+ {% for platform in test_platforms %}
60+ test_{{ package.name }}_{{ platform.name }}_{{ editor.version }} :
61+ name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
5862 agent :
5963 type : {{ platform.type }}
6064 image : {{ platform.image }}
6165 flavor : {{ platform.flavor}}
6266 commands :
6367 - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
64- - upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
68+ - upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ editor.coverageOptions }}
69+
70+ {% if package.name == "com.unity.ml-agents" %}
71+ # TODO get coverage tests running for extensions too
6572 - python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
73+ {% endif %}
6674 artifacts :
6775 logs :
6876 paths :
@@ -77,15 +85,20 @@ test_{{ platform.name }}_{{ editor.version }}:
7785 pull_request.target match "release.+") AND
7886 NOT pull_request.draft AND
7987 (pull_request.changes.any match "com.unity.ml-agents/**" OR
88+ {% if package.name == "com.unity.ml-agents.extensions" %}
89+ pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
90+ {% endif %}
8091 pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml")
8192 {% endif %}
93+ {% endfor %}
8294 {% endfor %}
8395{% endfor %}
8496
85- {% for editor in trunk_editor %}
86- {% for platform in test_platforms %}
87- test_{{ platform.name }}_trunk :
88- name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
97+ {% for package in packages %}
98+ {% for editor in trunk_editor %}
99+ {% for platform in test_platforms %}
100+ test_{{ package.name }}_{{ platform.name }}_trunk :
101+ name : {{ package.name }} test {{ editor.version }} on {{ platform.name }}
89102 agent :
90103 type : {{ platform.type }}
91104 image : {{ platform.image }}
@@ -94,8 +107,11 @@ test_{{ platform.name }}_trunk:
94107 - python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple
95108 - unity-downloader-cli -u trunk -c editor --wait --fast
96109 - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
97- - upm-ci package test -u {{ editor.version }} --package-path com.unity.ml-agents {{ editor.coverageOptions }}
110+ - upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ editor.coverageOptions }}
111+ {% if package.name == "com.unity.ml-agents" %}
112+ # TODO get coverage tests running for extensions too
98113 - python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
114+ {% endif %}
99115 artifacts :
100116 logs :
101117 paths :
@@ -106,3 +122,4 @@ test_{{ platform.name }}_trunk:
106122 cancel_old_ci : true
107123 {% endfor %}
108124 {% endfor %}
125+ {% endfor %}
0 commit comments