Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c3e23cc
trying a simpler approach
seanstolberg-unity Mar 24, 2021
1c08967
Add branches that can trigger to description
seanstolberg-unity Mar 24, 2021
b331004
update
seanstolberg-unity Mar 24, 2021
c34ae75
fine tune names
seanstolberg-unity Mar 24, 2021
de4c424
remove project flag for build that only runs package tests
seanstolberg-unity Mar 24, 2021
07c6eaf
update name
seanstolberg-unity Mar 24, 2021
b530647
name format
seanstolberg-unity Mar 24, 2021
5c3fc4d
name format
seanstolberg-unity Mar 24, 2021
4dcceba
format
seanstolberg-unity Mar 24, 2021
c0c2c78
format
seanstolberg-unity Mar 24, 2021
efc06d4
add new file just for package tests
seanstolberg-unity Mar 24, 2021
18fcbe9
rename
seanstolberg-unity Mar 24, 2021
05ba9a7
format
seanstolberg-unity Mar 24, 2021
b3a0e0d
new yml file, re-organize
seanstolberg-unity Mar 24, 2021
f646849
updates
seanstolberg-unity Mar 24, 2021
cee9443
updates
seanstolberg-unity Mar 25, 2021
63a69e2
clean up
seanstolberg-unity Mar 25, 2021
5e6ee2d
commenting out for now
seanstolberg-unity Mar 25, 2021
78b63da
update test name
seanstolberg-unity Mar 25, 2021
5f8d942
bug fix attempt
seanstolberg-unity Mar 25, 2021
2b82e16
bug fix
seanstolberg-unity Mar 25, 2021
ec9cbeb
bug fix
seanstolberg-unity Mar 25, 2021
3dbb12f
update
seanstolberg-unity Mar 25, 2021
0fa5891
update
seanstolberg-unity Mar 25, 2021
d01960f
fix project path
seanstolberg-unity Mar 25, 2021
a5b6bd3
test
seanstolberg-unity Mar 25, 2021
900e82b
user var
seanstolberg-unity Mar 25, 2021
9afeaa1
fix variable
seanstolberg-unity Mar 25, 2021
8784db4
test
seanstolberg-unity Mar 25, 2021
59dba2a
updates
seanstolberg-unity Mar 26, 2021
4ad9dfc
bug fix
seanstolberg-unity Mar 26, 2021
9d8b4c4
update name
seanstolberg-unity Mar 26, 2021
30d488b
create triggers file
seanstolberg-unity Mar 26, 2021
a033744
test
seanstolberg-unity Mar 26, 2021
9a1f544
test
seanstolberg-unity Mar 26, 2021
985adcc
fix typo
seanstolberg-unity Mar 26, 2021
3c187b5
fix typo
seanstolberg-unity Mar 26, 2021
94d0035
comment
seanstolberg-unity Mar 26, 2021
cee2f28
update pr trigger
seanstolberg-unity Mar 26, 2021
c02a0c3
test
seanstolberg-unity Mar 26, 2021
3383c9d
update names
seanstolberg-unity Mar 26, 2021
451d89c
test
seanstolberg-unity Mar 26, 2021
46495a1
cleanup
seanstolberg-unity Mar 26, 2021
d0b8d84
update
seanstolberg-unity Mar 26, 2021
12fcc8f
add nightly trigger
seanstolberg-unity Mar 26, 2021
a80725f
test
seanstolberg-unity Mar 26, 2021
d18f9d2
updates
seanstolberg-unity Mar 26, 2021
1c7584b
iterate through all packages
seanstolberg-unity Mar 26, 2021
5618245
fix path
seanstolberg-unity Mar 26, 2021
91d144f
updates from pr
seanstolberg-unity Mar 26, 2021
5833195
loop through all packages
seanstolberg-unity Mar 26, 2021
d6d6755
use vars
seanstolberg-unity Mar 26, 2021
2d58de9
use vars
seanstolberg-unity Mar 26, 2021
c140d1f
update
seanstolberg-unity Mar 26, 2021
d4395ee
test
seanstolberg-unity Mar 26, 2021
fed8cc6
bug fix
seanstolberg-unity Mar 26, 2021
5545db7
test
seanstolberg-unity Mar 26, 2021
4edff50
updates
seanstolberg-unity Mar 26, 2021
b4da87b
bug fix
seanstolberg-unity Mar 26, 2021
97ff3bb
Merge branch 'develop' into experimental/update-test-jobs
seanstolberg-unity Mar 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .yamato/_run-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% metadata_file .yamato/project.metafile %}
---
run_all_tests:
name: Run All Package and Project Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
{% for project in projects -%}
- .yamato/package-tests.yml#test_{{ projects.first.packages.first.name }}_{{ editor }}_{{ platform.name }}
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}

all_project_tests:
name: Run All Project Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
{% for project in projects -%}
- .yamato/project-tests.yml#test_{{ projects.first.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}

all_package_tests:
name: Run All Package Tests
dependencies:
# Pull in package and validate jobs through the badges job
- .yamato/_triggers.yml#badges_test_trigger
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
{% for project in projects -%}
- .yamato/package-tests.yml#test_{{ projects.first.packages.first.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
65 changes: 65 additions & 0 deletions .yamato/_triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{% metadata_file .yamato/project.metafile %}
---

develop_nightly_trigger:
name: Develop Branch Nightly Trigger
triggers:
recurring:
- branch: "develop"
frequency: 4 * * ?
dependencies:
- .yamato/_run-all.yml#run_all_tests
{% for project in projects -%}
- .yamato/code-coverage.yml#code_coverage_win_{{ project.name }}
{% endfor -%}


# Run all relevant tasks when a pull request targeting the develop
# branch is created or updated. Currently only mlapi package tests are
# enabled, since the others are missing test coverage and will fail CI.
pull_request_trigger:
name: Pull Request Trigger on {{ test_editors.first }} (master, develop, & release branches)
dependencies:
{% for project in projects -%}
- .yamato/project-tests.yml#validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
{% for platform in test_platforms -%}

- .yamato/package-tests.yml#test_{{ project.packages.first.name }}_{{ test_editors.first }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
triggers:
cancel_old_ci: true
pull_requests:
- targets:
only:
- "master"
- "develop"
- "/release\/.*/"

# Currently, we need to have a trigger to updated badges
# Only package badges currently exist
badges_test_trigger:
name: Badges Tests Trigger
agent:
type: Unity::VM
image: package-ci/ubuntu:stable
flavor: b1.small
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package izon -t
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
packages:
paths:
- "upm-ci~/packages/**/*"
dependencies:
{% for project in projects -%}
- .yamato/project-tests.yml#validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
- .yamato/package-tests.yml#test_{{ project.packages.first.name }}_{{ editor }}_{{ platform.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
28 changes: 28 additions & 0 deletions .yamato/package-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% metadata_file .yamato/project.metafile %}
---

# Go through all platforms, editors and packages in the metadata
# to generate its independent package tests and validation tests.
# The idea is to only run validation once per package and not mix.
# the results with package tests
{% for package in projects.first.packages -%}
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
test_{{ package.name }}_{{ editor }}_{{ platform.name }}:
name : {{ package.name }} package tests - {{ editor }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- {% 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 }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
{% endfor -%}
{% endfor -%}
{% endfor -%}
8 changes: 3 additions & 5 deletions .yamato/project-promotion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first
UPMCI_PROMOTION: 1
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci project test -u {{ test_editors.first }} --project-path {{ project.path }} --type vetting-tests --package-filter {{ package.name }}
- upm-ci project test -u {{ test_editors.first }} --project-path {{ project.path }} --type vetting-tests --project-path {{ project.path }} --package-filter {{ package.name }}
artifacts:
logs:
paths:
Expand All @@ -39,7 +39,7 @@ promote_{{ project.name }}_{{ package.name }}:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}
- .yamato/project-promotion.yml#promotion_validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
- .yamato/project-promotion.yml#promotion_validate_{{ project.name }}_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}

{% endfor -%}

Expand All @@ -60,7 +60,5 @@ promote_{{ project.name }}:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}
{% for package in packages -%}
- .yamato/project-promotion.yml#promotion_validate_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
{% endfor -%}
- .yamato/project-promotion.yml#promotion_validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
{% endfor -%}
8 changes: 4 additions & 4 deletions .yamato/project-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ publish_{{ project.name }}_{{ package.name }}:
flavor: b1.large
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package publish --package-path {{ package.path }}
- upm-ci package publish --package-path {{ project.packages.first.path }}
artifacts:
artifacts:
paths:
- "upm-ci~/packages/*.tgz"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}
- .yamato/project-test.yml#validate_{{ project.name }}_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
- .yamato/project-tests.yml#validate_{{ project.name }}_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
- .yamato/project-test.yml#test_{{ project.name }}_{{ package.name }}_{{ platform.name }}_{{ editor }}
- .yamato/project-tests.yml#test_{{ project.name }}_{{ project.packages.first.name }}_{{ platform.name }}_{{ editor }}
{% endfor -%}
{% endfor -%}

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

{% endfor -%}
137 changes: 0 additions & 137 deletions .yamato/project-test.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .yamato/project-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% metadata_file .yamato/project.metafile %}
---

# Validation job for package {{ package.name }}, only using the first entry in the
# platform and editor meta data
# Validation only occurs in editmode.

{% for project in projects -%}
validate_{{ project.packages.first.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}:
name : Validate Package {{ project.packages.first.name }} - {{ test_editors.first }} on {{ test_platforms.first.name }}
agent:
type: {{ test_platforms.first.type }}
image: {{ test_platforms.first.image }}
flavor: {{ test_platforms.first.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- {% 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
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/project-pack.yml#pack_{{ projects.first.name }}
{% endfor -%}

# For every platform and editor version, run its project tests without
# running package tests too since they are handled on their respective
# jobs
{% for project in projects -%}
{% for editor in test_editors -%}
{% for platform in test_platforms -%}
test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
name : {{ project.name }} project tests - {{ editor }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- {% if platform.name == "centos" %}DISPLAY=:0 {% endif %}upm-ci project test -u {{ editor }} --project-path {{ project.path }} --type project-tests
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/project-pack.yml#pack_{{ project.name }}

{% endfor -%}
{% endfor -%}
{% endfor -%}


2 changes: 1 addition & 1 deletion .yamato/project.metafile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test_platforms:
# Projects within the repository that will be tested. Name will be used
# for job ids, so it should not contain spaces/non-supported characters
projects:
- name: project
- name: testproject
path: testproject
# Packages within a project that will be tested
packages:
Expand Down