1+ {% metadata_file .yamato/project.metafile %}
2+ ---
3+ # Go through all platforms, editors and packages in the metadata
4+ # to generate its independent package tests and validation tests.
5+ # The idea is to only run validation once per package and not mix.
6+ # the results with package tests
7+ {% for package in projects.first.packages -%}
8+ {% for editor in test_editors -%}
9+ {% for platform in test_platforms -%}
10+ test_{{ projects.first.name}}_{{ package.name }}_{{ platform.name }}_{{ editor }} :
11+ name : Test Project {{ projects.first.name }} - Package {{ package.name }} - {{ editor }} on {{ platform.name }}
12+ agent :
13+ type : {{ platform.type }}
14+ image : {{ platform.image }}
15+ flavor : {{ platform.flavor}}
16+ commands :
17+ - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
18+ - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ projects.first.path }} --type package-tests --package-filter {{ package.name }}
19+ artifacts :
20+ logs :
21+ paths :
22+ - " upm-ci~/test-results/**/*"
23+ dependencies :
24+ - .yamato/project-pack.yml#pack_{{ projects.first.name }}
25+
26+ {% endfor -%}
27+ {% endfor -%}
28+
29+ # Validation job for package {{ package.name }}, only using the first entry in the
30+ # platform and editor meta data
31+ # Validation only occurs in editmode.
32+ validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }} :
33+ name : Validate Project {{ projects.first.name }} - Package {{ package.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }}
34+ agent :
35+ type : {{ test_platforms.first.type }}
36+ image : {{ test_platforms.first.image }}
37+ flavor : {{ test_platforms.first.flavor}}
38+ commands :
39+ - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
40+ - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --project-path {{ projects.first.path }} --type vetting-tests --package-filter {{ package.name }} --platform editmode
41+ artifacts :
42+ logs :
43+ paths :
44+ - " upm-ci~/test-results/**/*"
45+ dependencies :
46+ - .yamato/project-pack.yml#pack_{{ projects.first.name }}
47+ {% endfor -%}
48+
49+ # For every platform and editor version, run its project tests without
50+ # running package tests too since they are handled on their respective
51+ # jobs
52+ {% for project in projects -%}
53+ {% for editor in test_editors -%}
54+ {% for platform in test_platforms -%}
55+ test_{{ project.name }}_{{ editor }}_{{ platform.name }} :
56+ name : Test Project {{ project.name }} - {{ editor }} on {{ platform.name }}
57+ agent :
58+ type : {{ platform.type }}
59+ image : {{ platform.image }}
60+ flavor : {{ platform.flavor}}
61+ commands :
62+ - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
63+ - {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
64+ artifacts :
65+ logs :
66+ paths :
67+ - " upm-ci~/test-results/**/*"
68+ dependencies :
69+ - .yamato/project-pack.yml#pack_{{ project.name }}
70+
71+ {% endfor -%}
72+ {% endfor -%}
73+ {% endfor -%}
74+
75+ # Currently, we need to have a trigger to updated badges
76+ # Only package badges currently exist
77+ badges_test_trigger :
78+ name : Badges Tests Trigger
79+ agent :
80+ type : Unity::VM
81+ image : package-ci/ubuntu:stable
82+ flavor : b1.small
83+ commands :
84+ - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
85+ - upm-ci package izon -t
86+ artifacts :
87+ logs :
88+ paths :
89+ - " upm-ci~/test-results/**/*"
90+ packages :
91+ paths :
92+ - " upm-ci~/packages/**/*"
93+ dependencies :
94+ {% for project in projects -%}
95+ {% for package in projects.first.packages -%}
96+ - .yamato/project-test.yml#validate_{{ projects.first.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
97+ {% for editor in test_editors -%}
98+ {% for platform in test_platforms -%}
99+ - .yamato/project-test.yml#test_{{ projects.first.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
100+ {% endfor -%}
101+ {% endfor -%}
102+ {% endfor -%}
103+ {% endfor -%}
104+
105+ all_tests_trigger :
106+ name : Repository Tests Trigger
107+ dependencies :
108+ # Pull in package and validate jobs through the badges job
109+ - .yamato/project-test.yml#badges_test_trigger
110+ {% for editor in test_editors -%}
111+ {% for platform in test_platforms -%}
112+ {% for project in projects -%}
113+ - .yamato/project-test.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
114+ {% endfor -%}
115+ {% endfor -%}
116+ {% endfor -%}
117+
118+ # Run all relevant tasks when a pull request targeting the develop
119+ # branch is created or updated. Currently only mlapi package tests are
120+ # enabled, since the others are missing test coverage and will fail CI.
121+ develop_pull_request_trigger :
122+ name : Develop Branch Triggers
123+ dependencies :
124+ - .yamato/project-test.yml#validate_{{ projects.first.name }}_com.unity.multiplayer.mlapi_{{ test_platforms.first.name }}_{{ test_editors.first }}
125+ {% for editor in test_editors -%}
126+ {% for platform in test_platforms -%}
127+ - .yamato/project-test.yml#test_{{ projects.first.name }}_com.unity.multiplayer.mlapi_{{ platform.name }}_{{ editor }}
128+ {% endfor -%}
129+ {% endfor -%}
130+ triggers :
131+ cancel_old_ci : true
132+ pull_requests :
133+ - targets :
134+ only :
135+ - " develop"
0 commit comments