Skip to content

Commit 9657ea8

Browse files
authored
Merge branch 'develop' into feature/naming-rules
2 parents c14a7ed + e9c826f commit 9657ea8

File tree

8 files changed

+194
-147
lines changed

8 files changed

+194
-147
lines changed

.yamato/_run-all.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
run_all_tests:
4+
name: Run All Package and Project Tests
5+
dependencies:
6+
# Pull in package and validate jobs through the badges job
7+
- .yamato/_triggers.yml#badges_test_trigger
8+
{% for editor in test_editors -%}
9+
{% for platform in test_platforms -%}
10+
{% for project in projects -%}
11+
- .yamato/package-tests.yml#test_{{ projects.first.packages.first.name }}_{{ editor }}_{{ platform.name }}
12+
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
13+
{% endfor -%}
14+
{% endfor -%}
15+
{% endfor -%}
16+
17+
all_project_tests:
18+
name: Run All Project Tests
19+
dependencies:
20+
# Pull in package and validate jobs through the badges job
21+
- .yamato/_triggers.yml#badges_test_trigger
22+
{% for editor in test_editors -%}
23+
{% for platform in test_platforms -%}
24+
{% for project in projects -%}
25+
- .yamato/project-tests.yml#test_{{ projects.first.name }}_{{ editor }}_{{ platform.name }}
26+
{% endfor -%}
27+
{% endfor -%}
28+
{% endfor -%}
29+
30+
all_package_tests:
31+
name: Run All Package Tests
32+
dependencies:
33+
# Pull in package and validate jobs through the badges job
34+
- .yamato/_triggers.yml#badges_test_trigger
35+
{% for editor in test_editors -%}
36+
{% for platform in test_platforms -%}
37+
{% for project in projects -%}
38+
- .yamato/package-tests.yml#test_{{ projects.first.packages.first.name }}_{{ editor }}_{{ platform.name }}
39+
{% endfor -%}
40+
{% endfor -%}
41+
{% endfor -%}

.yamato/_triggers.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
develop_nightly_trigger:
5+
name: Develop Branch Nightly Trigger
6+
triggers:
7+
recurring:
8+
- branch: "develop"
9+
frequency: 4 * * ?
10+
dependencies:
11+
- .yamato/_run-all.yml#run_all_tests
12+
{% for project in projects -%}
13+
- .yamato/code-coverage.yml#code_coverage_win_{{ project.name }}
14+
{% endfor -%}
15+
16+
17+
# Run all relevant tasks when a pull request targeting the develop
18+
# branch is created or updated. Currently only mlapi package tests are
19+
# enabled, since the others are missing test coverage and will fail CI.
20+
pull_request_trigger:
21+
name: Pull Request Trigger on {{ test_editors.first }} (master, develop, & release branches)
22+
dependencies:
23+
{% for project in projects -%}
24+
- .yamato/project-tests.yml#validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
25+
{% for platform in test_platforms -%}
26+
27+
- .yamato/package-tests.yml#test_{{ project.packages.first.name }}_{{ test_editors.first }}_{{ platform.name }}
28+
{% endfor -%}
29+
{% endfor -%}
30+
triggers:
31+
cancel_old_ci: true
32+
pull_requests:
33+
- targets:
34+
only:
35+
- "master"
36+
- "develop"
37+
- "/release\/.*/"
38+
39+
# Currently, we need to have a trigger to updated badges
40+
# Only package badges currently exist
41+
badges_test_trigger:
42+
name: Badges Tests Trigger
43+
agent:
44+
type: Unity::VM
45+
image: package-ci/ubuntu:stable
46+
flavor: b1.small
47+
commands:
48+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
49+
- upm-ci package izon -t
50+
artifacts:
51+
logs:
52+
paths:
53+
- "upm-ci~/test-results/**/*"
54+
packages:
55+
paths:
56+
- "upm-ci~/packages/**/*"
57+
dependencies:
58+
{% for project in projects -%}
59+
- .yamato/project-tests.yml#validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
60+
{% for editor in test_editors -%}
61+
{% for platform in test_platforms -%}
62+
- .yamato/package-tests.yml#test_{{ project.packages.first.name }}_{{ editor }}_{{ platform.name }}
63+
{% endfor -%}
64+
{% endfor -%}
65+
{% endfor -%}

.yamato/package-tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
# Go through all platforms, editors and packages in the metadata
5+
# to generate its independent package tests and validation tests.
6+
# The idea is to only run validation once per package and not mix.
7+
# the results with package tests
8+
{% for package in projects.first.packages -%}
9+
{% for editor in test_editors -%}
10+
{% for platform in test_platforms -%}
11+
test_{{ package.name }}_{{ editor }}_{{ platform.name }}:
12+
name : {{ package.name }} package tests - {{ editor }} on {{ platform.name }}
13+
agent:
14+
type: {{ platform.type }}
15+
image: {{ platform.image }}
16+
flavor: {{ platform.flavor}}
17+
commands:
18+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
19+
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --type package-tests --project-path {{ projects.first.name }} --package-filter {{ package.name }}
20+
artifacts:
21+
logs:
22+
paths:
23+
- "upm-ci~/test-results/**/*"
24+
dependencies:
25+
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
26+
{% endfor -%}
27+
{% endfor -%}
28+
{% endfor -%}

.yamato/project-promotion.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first
1414
UPMCI_PROMOTION: 1
1515
commands:
1616
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
17-
- upm-ci project test -u {{ test_editors.first }} --project-path {{ project.path }} --type vetting-tests --package-filter {{ package.name }}
17+
- upm-ci project test -u {{ test_editors.first }} --project-path {{ project.path }} --type vetting-tests --project-path {{ project.path }} --package-filter {{ package.name }}
1818
artifacts:
1919
logs:
2020
paths:
@@ -39,7 +39,7 @@ promote_{{ project.name }}_{{ package.name }}:
3939
- "upm-ci~/packages/*.tgz"
4040
dependencies:
4141
- .yamato/project-pack.yml#pack_{{ project.name }}
42-
- .yamato/project-promotion.yml#promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
42+
- .yamato/project-promotion.yml#promotion_validate_{{ project.name }}_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
4343

4444
{% endfor -%}
4545

@@ -60,7 +60,5 @@ promote_{{ project.name }}:
6060
- "upm-ci~/packages/*.tgz"
6161
dependencies:
6262
- .yamato/project-pack.yml#pack_{{ project.name }}
63-
{% for package in packages -%}
64-
- .yamato/project-promotion.yml#promotion_validate_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
65-
{% endfor -%}
63+
- .yamato/project-promotion.yml#promotion_validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
6664
{% endfor -%}

.yamato/project-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ publish_{{ project.name }}_{{ package.name }}:
1010
flavor: b1.large
1111
commands:
1212
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
13-
- upm-ci package publish --package-path {{ package.path }}
13+
- upm-ci package publish --package-path {{ project.packages.first.path }}
1414
artifacts:
1515
artifacts:
1616
paths:
1717
- "upm-ci~/packages/*.tgz"
1818
dependencies:
1919
- .yamato/project-pack.yml#pack_{{ project.name }}
20-
- .yamato/project-test.yml#validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
20+
- .yamato/project-tests.yml#validate_{{ project.name }}_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
2121
{% for editor in test_editors -%}
2222
{% for platform in test_platforms -%}
23-
- .yamato/project-test.yml#test_{{ project.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
23+
- .yamato/project-tests.yml#test_{{ project.name }}_{{ project.packages.first.name }}_{{ platform.name }}_{{ editor }}
2424
{% endfor -%}
2525
{% endfor -%}
2626

@@ -41,6 +41,6 @@ publish_{{ project.name }}:
4141
- "upm-ci~/packages/*.tgz"
4242
dependencies:
4343
- .yamato/project-pack.yml#pack_{{ project.name }}
44-
- .yamato/project-test.yml#all_tests_trigger
44+
- .yamato/_run-all.yml#run_all_tests
4545

4646
{% endfor -%}

.yamato/project-test.yml

Lines changed: 0 additions & 137 deletions
This file was deleted.

.yamato/project-tests.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
# Validation job for package {{ package.name }}, only using the first entry in the
5+
# platform and editor meta data
6+
# Validation only occurs in editmode.
7+
8+
{% for project in projects -%}
9+
validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}:
10+
name : Validate Package {{ project.packages.first.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }}
11+
agent:
12+
type: {{ test_platforms.first.type }}
13+
image: {{ test_platforms.first.image }}
14+
flavor: {{ test_platforms.first.flavor}}
15+
commands:
16+
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
17+
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ test_editors.first }} --type vetting-tests --project-path {{ project.path }} --package-filter {{ project.packages.first.name }} --platform editmode
18+
artifacts:
19+
logs:
20+
paths:
21+
- "upm-ci~/test-results/**/*"
22+
dependencies:
23+
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
24+
{% endfor -%}
25+
26+
# For every platform and editor version, run its project tests without
27+
# running package tests too since they are handled on their respective
28+
# jobs
29+
{% for project in projects -%}
30+
{% for editor in test_editors -%}
31+
{% for platform in test_platforms -%}
32+
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
33+
name : {{ project.name }} project tests - {{ editor }} on {{ platform.name }}
34+
agent:
35+
type: {{ platform.type }}
36+
image: {{ platform.image }}
37+
flavor: {{ platform.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 {{ editor }} --project-path {{ project.path }} --type project-tests
41+
artifacts:
42+
logs:
43+
paths:
44+
- "upm-ci~/test-results/**/*"
45+
dependencies:
46+
- .yamato/project-pack.yml#pack_{{ project.name }}
47+
48+
{% endfor -%}
49+
{% endfor -%}
50+
{% endfor -%}
51+
52+

.yamato/project.metafile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_platforms:
2929
# Projects within the repository that will be tested. Name will be used
3030
# for job ids, so it should not contain spaces/non-supported characters
3131
projects:
32-
- name: project
32+
- name: testproject
3333
path: testproject
3434
# Packages within a project that will be tested
3535
packages:

0 commit comments

Comments
 (0)