|
| 1 | +{% metadata_file .yamato/environment.metafile -%} |
| 2 | + |
| 3 | +--- |
| 4 | +{% for platform in test_platforms -%} |
| 5 | +{% for version in platform.versions -%} |
| 6 | +test_coverage_{{ platform.name }}_{{ version }}: |
| 7 | + name : Test Coverage on {{ platform.name }} ({{ version }}) |
| 8 | + agent: |
| 9 | + type: {{ platform.type }} |
| 10 | + image: {{ platform.image }} |
| 11 | + flavor: {{ platform.flavor}} |
| 12 | + commands: |
| 13 | + {% if platform.platform == "desktop" %}- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm |
| 14 | + - upm-ci package test -u {{ version }} --platform {{ platform.runtime }} --type isolation-tests --extra-create-project-arg=-upmNoDefaultPackages --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+{{ package-assembly }}*' |
| 15 | + {% else %}- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade |
| 16 | + - unity-downloader-cli -c Editor -c {{ platform.name }} -c il2cpp -u trunk --fast --wait |
| 17 | + - curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr{% if platform.name == "Android" %}.bat{% endif %} --output utr{% if platform.name == "Android" %}.bat{% endif %}{% if platform.name == "iOS" %} |
| 18 | + - chmod +x ./utr{% endif %} |
| 19 | + - ./utr{% if platform.name == "Android" %}.bat{% endif %} --suite=playmode --platform={{ platform.name }} --editor-location=.Editor --testproject=TestProject --player-save-path=build/players --artifacts_path=build/logs --build-only |
| 20 | + - | |
| 21 | + {% if platform.name == "Android" %}set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP% |
| 22 | + start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP% |
| 23 | + start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices |
| 24 | + {% endif %}./utr --suite=playmode --platform={{ platform.name }} --player-load-path=build/players --artifacts_path=build/test-results |
| 25 | + {% endif %} |
| 26 | + artifacts: |
| 27 | + logs: |
| 28 | + paths: |
| 29 | + - "{% if platform.platform == "desktop" %}upm-ci~{% else %}build{% endif %}/test-results/**/*" |
| 30 | + dependencies: |
| 31 | + - .yamato/package-pack.yml#pack |
| 32 | +{% endfor -%} |
| 33 | +{% endfor -%} |
| 34 | + |
| 35 | +{% for platform in test_platforms -%} |
| 36 | +tests_coverage_all_{{ platform.name }}: |
| 37 | + name: _Run All Coverage Tests ({{ platform.name }}) |
| 38 | + dependencies: |
| 39 | + - .yamato/package-pack.yml#pack |
| 40 | +{% for version in platform.versions -%} |
| 41 | + - .yamato/package-coverage.yml#test_coverage_{{ platform.name }}_{{ version }} |
| 42 | +{% endfor -%} |
| 43 | +{% endfor -%} |
| 44 | + |
| 45 | +test_trigger: |
| 46 | + name: Package Tests Trigger |
| 47 | + triggers: |
| 48 | + branches: |
| 49 | + only: |
| 50 | + - "master" |
| 51 | + pull_requests: |
| 52 | + - targets: |
| 53 | + only: |
| 54 | + - "/.*/" |
| 55 | + dependencies: |
| 56 | + - .yamato/package-pack.yml#pack |
| 57 | +{% for platform in test_platforms -%} |
| 58 | +{% for version in platform.versions -%} |
| 59 | + - .yamato/package-coverage.yml#test_coverage_{{platform.name}}_{{version}} |
| 60 | +{% endfor -%} |
| 61 | +{% endfor -%} |
0 commit comments