浏览代码

Fix extension package tests (#4189)

/MLA-1734-demo-provider
GitHub 4 年前
当前提交
07acc84d
共有 3 个文件被更改,包括 10 次插入16 次删除
  1. 13
      .yamato/com.unity.ml-agents-pack.yml
  2. 11
      .yamato/com.unity.ml-agents-test.yml
  3. 2
      DevProject/Packages/manifest.json

13
.yamato/com.unity.ml-agents-pack.yml


packages:
- name: com.unity.ml-agents
- name: com.unity.ml-agents.extensions
---
{% for package in packages %}
pack_{{ package.name }}:
name: Pack {{ package.name }}
pack:
name: Pack
agent:
type: Unity::VM::osx
image: package-ci/mac:stable

- upm-ci package pack --package-path {{ package.name }}
- upm-ci project pack --project-path Project
artifacts:
packages:
paths:

{% endfor %}

11
.yamato/com.unity.ml-agents-test.yml


flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --type package-tests --package-filter {{ package.name }} {{ editor.coverageOptions }}
{% if package.name == "com.unity.ml-agents" %}
# TODO get coverage tests running for extensions too
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}

paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
{% if platform.name == "mac" %}

NOT pull_request.draft AND
(pull_request.changes.any match "com.unity.ml-agents/**" OR
{% if package.name == "com.unity.ml-agents" %}
{% if package.name == "com.unity.ml-agents.extensions" %}
pull_request.changes.any match "com.unity.ml-agents.extensions/**" OR
{% endif %}
pull_request.changes.any match ".yamato/com.unity.ml-agents-test.yml")

- python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple
- unity-downloader-cli -u trunk -c editor --wait --fast
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package test -u {{ editor.version }} --package-path {{ package.name }} {{ editor.coverageOptions }}
- upm-ci project test -u {{ editor.version }} --project-path Project --type package-tests --package-filter {{ package.name }} {{ editor.coverageOptions }}
{% if package.name == "com.unity.ml-agents" %}
# TODO get coverage tests running for extensions too
- python ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}

paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack_{{ package.name }}
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
{% endfor %}

2
DevProject/Packages/manifest.json


"com.unity.ide.vscode": "1.1.4",
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
"com.unity.multiplayer-hlapi": "1.0.4",
"com.unity.multiplayer-hlapi": "1.0.6",
"com.unity.package-manager-doctools": "1.1.1-preview.3",
"com.unity.package-validation-suite": "0.11.0-preview",
"com.unity.purchasing": "2.0.6",

正在加载...
取消
保存