Skip to content

Commit 43218a3

Browse files
authored
chore: Add CI to test minimal project with different versions of transport (#2190)
chore: add ci to test minimal project with different versions of transport
1 parent 813c3dc commit 43218a3

4 files changed

Lines changed: 100 additions & 0 deletions

File tree

.yamato/_run-all.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ run_all_tests:
1818
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
1919
{% endif -%}
2020
{% endfor -%}
21+
22+
## Test minimal project with different versions of dependencies
23+
{% if project.name == "minimalproject" -%}
24+
{% for dependency in dependencies -%}
25+
{% for depeditor in dependency.test_editors -%}
26+
{% if depeditor != "trunk" -%}
27+
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ depeditor }}_{{ platform.name }}
28+
{% endif -%}
29+
{% endfor -%}
30+
{% endfor -%}
31+
{% endif -%}
2132
{% endfor -%}
2233
{% endfor -%}
2334

@@ -34,6 +45,17 @@ run_all_tests_trunk:
3445
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
3546
{% endif -%}
3647
{% endfor -%}
48+
49+
## Test minimal project with different versions of dependencies on trunk
50+
{% if project.name == "minimalproject" -%}
51+
{% for dependency in dependencies -%}
52+
{% for depeditor in dependency.test_editors -%}
53+
{% if depeditor == "trunk" -%}
54+
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ depeditor }}_{{ platform.name }}
55+
{% endif -%}
56+
{% endfor -%}
57+
{% endfor -%}
58+
{% endif -%}
3759
{% endfor -%}
3860
{% endfor -%}
3961

@@ -63,6 +85,22 @@ all_package_tests:
6385
{% endfor -%}
6486
{% endfor -%}
6587

88+
# Test minimal project with different versions of dependencies
89+
all_compatibility_tests:
90+
name: Run All Compatibility Tests
91+
dependencies:
92+
{% for platform in test_platforms -%}
93+
{% for project in projects -%}
94+
{% if project.name == "minimalproject" -%}
95+
{% for dependency in dependencies -%}
96+
{% for editor in dependency.test_editors -%}
97+
- .yamato/package-tests.yml#test_compatibility_{{ project.name }}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ editor }}_{{ platform.name }}
98+
{% endfor -%}
99+
{% endfor -%}
100+
{% endif -%}
101+
{% endfor -%}
102+
{% endfor -%}
103+
66104
all_singlenode_multiprocess_tests:
67105
name: Run All Multiprocess Tests - Single Node
68106
dependencies:

.yamato/package-tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,31 @@ test_{{project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}:
2727
{% endfor -%}
2828
{% endfor -%}
2929
{% endfor -%}
30+
{% endfor -%}
31+
32+
# Test minimal project with different versions of dependencies
33+
{% for project in projects -%}
34+
{% if project.name == "minimalproject" -%}
35+
{% for dependency in dependencies -%}
36+
{% for editor in dependency.test_editors -%}
37+
{% for platform in test_platforms -%}
38+
test_compatibility_{{project.name}}_{{ project.packages.first.name }}_with_{{ dependency.name }}@{{ dependency.version }}_{{ editor }}_{{ platform.name }}:
39+
name : {{ project.name }} - {{ project.packages.first.name }} with {{ dependency.name }}@{{ dependency.version }} - {{ editor }} on {{ platform.name }}
40+
agent:
41+
type: {{ platform.type }}
42+
image: {{ platform.image }}
43+
flavor: {{ platform.flavor}}
44+
commands:
45+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
46+
- {% if platform.name == "ubuntu" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --type project-tests --project-path {{ project.name }} --package-filter {{ project.packages.first.name }}
47+
artifacts:
48+
logs:
49+
paths:
50+
- "upm-ci~/test-results/**/*"
51+
dependencies:
52+
- .yamato/project-pack.yml#pack_{{ project.name }}_{{ dependency.name }}@{{ dependency.version }}
53+
{% endfor -%}
54+
{% endfor -%}
55+
{% endfor -%}
56+
{% endif -%}
3057
{% endfor -%}

.yamato/project-pack.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,31 @@ pack_{{ project.name }}:
1414
packages:
1515
paths:
1616
- "upm-ci~/packages/**/*"
17+
{% endfor -%}
18+
19+
# Pack minimal project with different versions of dependencies
20+
{% for project in projects -%}
21+
{% if project.name == "minimalproject" -%}
22+
{% for dependency in dependencies -%}
23+
pack_{{ project.name }}_{{ dependency.name }}@{{ dependency.version }}:
24+
name: Pack {{ project.name }} with {{ dependency.name }}@{{ dependency.version }}
25+
agent:
26+
type: Unity::VM
27+
image: package-ci/ubuntu:stable
28+
flavor: b1.small
29+
commands:
30+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
31+
- curl -L https://artifactory.prd.it.unity3d.com/artifactory/api/gpg/key/public | sudo apt-key add -
32+
- sudo sh -c "echo 'deb https://artifactory.prd.it.unity3d.com/artifactory/unity-apt-local bionic main' > /etc/apt/sources.list.d/unity.list"
33+
- sudo apt update
34+
- sudo apt install -y unity-config
35+
- unity-config settings project-path {{ project.path }}
36+
- unity-config project add dependency {{ dependency.name }}@{{ dependency.version }}
37+
- upm-ci project pack --project-path {{ project.path }}
38+
artifacts:
39+
packages:
40+
paths:
41+
- "upm-ci~/packages/**/*"
42+
{% endfor -%}
43+
{% endif -%}
1744
{% endfor -%}

.yamato/project.metafile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ projects:
6666
- 2022.2
6767
- trunk
6868

69+
# Package dependencies
70+
dependencies:
71+
- name: com.unity.transport
72+
version: 2.0.0-exp.6
73+
test_editors:
74+
- 2022.2
75+
- trunk
76+
6977
# Scripting backends used by Standalone Playmode Tests
7078
scripting_backends:
7179
- mono

0 commit comments

Comments
 (0)