Skip to content

Commit ca111ea

Browse files
committed
Rewrite of code coverage
1 parent 33bb021 commit ca111ea

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

.yamato/code-coverage.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
{% metadata_file .yamato/project.metafile %}
22
---
33
# Support for code coverage in public repos is not yet available
4-
{% for project in projects -%}
5-
{% if project.has_tests == "true" -%}
6-
{% for platform in test_platforms -%}
7-
{% if platform.name == "win" -%}
8-
code_coverage_win_{{ project.name }}_{{ validation_editors.last }}:
9-
name: Code Coverage Report - Windows - {{ project.name }} - {{ validation_editors.last }}
4+
code_coverage_win_{{ project.first.name }}_{{ validation_editors.last }}:
5+
name: Code Coverage - NGO [platform.first.name, validation_editors.last]
106
agent:
11-
type: platform.type
12-
image: platform.image
13-
flavor: platform.flavor
7+
type: platform.first.type
8+
image: platform.first.image
9+
flavor: platform.first.flavor
1410
commands:
1511
- pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
1612
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
1713
- unity-downloader-cli -u {{ validation_editors.last }} -c editor --wait --fast
18-
- upm-ci package test -u .Editor --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'enableCyclomaticComplexity;generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.Netcode.Editor,+Unity.Netcode.Runtime,+Unity.Netcode.Components'
14+
- upm-ci package test -u .Editor --package-path com.unity.netcode.gameobjects --enable-code-coverage --code-coverage-options 'generateAdditionalMetrics;generateBadgeReport;generateHtmlReport;assemblyFilters:+Unity.Netcode*' --extra-utr-arg="--extra-editor-arg=--burst-disable-compilation --extra-editor-arg=-testCategory --extra-editor-arg=!Performance --timeout=1800 --reruncount=1 --clean-library-on-rerun --extra-create-project-arg=-upmNoDefaultPackages"
1915
artifacts:
2016
logs:
2117
paths:
2218
- "upm-ci~/test-results/**/*"
2319
dependencies:
24-
- .yamato/project-pack.yml#pack_{{ project.name }}
25-
{% endif -%}
26-
{% endfor -%}
27-
{% endif -%}
28-
{% endfor -%}
20+
- .yamato/project-pack.yml#pack_{{ project.first.name }}

.yamato/project.metafile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Platforms that will be tested. The first entry in this array will also
2-
# be used for validation
2+
# be used for validation, code coverage etc (windows) so it's important to be careful when changing order of test platforms!
33
test_platforms:
44
- name: win
55
type: Unity::VM
@@ -28,13 +28,17 @@ test_platforms:
2828

2929
# Editors to be used for testing.
3030
# Since NGOv2 official support started from U6 it means that only those editors should be used for testing
31+
# The last entry in this array will also
32+
# be used for validation, code coverage etc (windows) so it's important to be careful when changing order of validation editors!
3133
validation_editors:
3234
- 6000.0
3335
- 6000.1
3436
- trunk
3537

3638
# Projects within the repository that will be tested. Name will be used
3739
# for job ids, so it should not contain spaces/non-supported characters
40+
# The first entry in this array will also
41+
# be used for validation, code coverage etc (windows) so it's important to be careful when changing order of projects!
3842
projects:
3943
- name: testproject
4044
path: testproject

0 commit comments

Comments
 (0)