-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy path_triggers.yml
More file actions
142 lines (126 loc) · 8.42 KB
/
_triggers.yml
File metadata and controls
142 lines (126 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
---
# DESCRIPTION--------------------------------------------------------------------------
# This configuration defines three main CI trigger patterns:
# 1. Pull Request Validation: Validation performed on PR basis
# 2. Nightly Development: Test set run nightly (validates most important test cases)
# 3. Weekly Full Validation: Test set run weekly (validates all test cases to prevent any surprises)
# Each pattern represents different balance between validation depth, execution time and CI resource usage
# TRIGGER PATTERNS-------------------------------------------------------------------
# Pull Request:
# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
# Triggers on PRs to develop, develop, and release branches
# Focuses on critical validation paths that we should validate before merging PRs
# Cancels previous runs on new commits
# Excludes draft PRs
# Nightly:
# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
# Runs daily on develop (local configuration)
# Includes all test types but only on trunk.
# Adds platform-specific and APV validation
# Weekly:
# This test validates same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project
# Runs across all supported editor versions
# Includes code coverage analysis
# Validates all projects and standards
# CONFIGURATION STRUCTURE--------------------------------------------------------------
# Jobs configurations are generated by ensuring that all dependencies are successful.
# The dependencies are taken from _run-all.yml file where we can gather multiple tests into proper sets
# QUALITY CONSIDERATIONS---------------------------------------------------------------
# It's important to ensure that all dependencies exist (this can be verified in Yamato) since a modification in parameters may result in a given job not being generated, and thus we will not be able to run such erroneous job.
#-----------------------------------------------------------------------------------
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
# In order to have better coverage we run desktop standalone tests with different configurations which allows to mostly cover for different platforms, scripting backends and editor versions.
# Since standards job is a part of initial checks it's not present as direct dependency here
pull_request_trigger:
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
# Run the following tests on a selection of different desktop platforms
dependencies:
# Run package EditMode and Playmode package tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
- .yamato/package-tests.yml#package_test_-_ngo_trunk_mac
- .yamato/package-tests.yml#package_test_-_ngo_2022.3_win
# Run testproject EditMode and Playmode project tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
- .yamato/project-tests.yml#test_testproject_win_trunk
- .yamato/project-tests.yml#test_testproject_mac_2022.3
# Run tools integration tests EditMode and Playmode tests on trunk and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
- .yamato/project-tests.yml#test_testproject-tools-integration_ubuntu_2022.3
- .yamato/project-tests.yml#test_testproject-tools-integration_win_trunk
# Run standalone test. We run it only on Ubuntu since it's the fastest machine, and it was noted that for example distribution on macOS is taking 40m since we switched to Apple Silicon
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_ubuntu_il2cpp_2022.3
triggers:
cancel_old_ci: true
pull_requests:
- targets:
only:
- "develop"
- "develop-2.0.0"
- "/release\/.*/"
- drafts: false
# Run all tests on trunk on nightly basis.
# Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds
# Those tests are all running on trunk editor (since it's daily and running all of them would add a lot of overhead)
develop_nightly:
name: "\U0001F319 [Nightly] Run All Tests [Trunk and 2021]"
triggers:
recurring:
- branch: develop
frequency: daily
rerun: always
dependencies:
# Run project standards to verify package/default project
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
- .yamato/project-standards.yml#standards_ubuntu_testproject_2021.3
# Run APV jobs to make sure the change won't break any dependants
- .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs
# Run package EditMode and Playmode tests on desktop platforms on trunk and 2021.3
- .yamato/_run-all.yml#run_all_package_tests_trunk
- .yamato/_run-all.yml#run_all_package_tests_2021
# Run project EditMode and PLaymode tests on desktop platforms on trunk and 2021.3
- .yamato/_run-all.yml#run_all_project_tests_trunk
- .yamato/_run-all.yml#run_all_project_tests_2021
# Run Runtime tests on desktop players on trunk and 2021 editors
- .yamato/_run-all.yml#run_all_project_tests_desktop_standalone_trunk
- .yamato/_run-all.yml#run_all_project_tests_desktop_standalone_2021
# Run Runtime tests on mobile players on trunk and 2021 editors
- .yamato/_run-all.yml#run_all_project_tests_mobile_standalone_trunk
- .yamato/_run-all.yml#run_all_project_tests_mobile_standalone_2021
# Run Runtime tests on console players on trunk and 2021 editors
- .yamato/_run-all.yml#run_all_project_tests_console_standalone_trunk
- .yamato/_run-all.yml#run_all_project_tests_console_standalone_2021
# Build player for webgl platform on trunk and 2021 editors
- .yamato/_run-all.yml#run_all_webgl_builds_trunk
- .yamato/_run-all.yml#run_all_webgl_builds_2021
# Build player for webgl platform on trunk and 2021 editors
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_ubuntu_trunk
- .yamato/project-updated-dependencies-test.yml#updated-dependencies_testproject_NGO_win_2021.3
# Run API validation to early-detect all new APIs that would force us to release new minor version of the package. Note that for this to work the package version in package.json must correspond to "actual package state" which means that it should be higher than last released version
- .yamato/vetting-test.yml#vetting_test
# Run all tests on weekly bases
# Same subset as develop_nightly but runs per all supported editors as well as executes code coverage test and runs project standards per project
# It's not running wrench jobs since those will run either way in nightly test run
# This in contrast to nightly checks will run tests on all editors (not only trunk). Running those on weekly basis and trunk tests nightly should be a good balance between making sure that tests are passing and overhead of running lots of tests
develop_weekly_trunk:
name: "\U0001F319 [Weekly] Run All Tests"
triggers:
recurring:
- branch: develop
frequency: weekly
rerun: always
dependencies:
# Run project standards to verify package/default project
- .yamato/_run-all.yml#run_all_projects_standards
# Run package EditMode and Playmode tests on desktop platforms
- .yamato/_run-all.yml#run_all_package_tests
# Run project EditMode and PLaymode tests on desktop platforms
- .yamato/_run-all.yml#run_all_project_tests
# Run Runtime tests on desktop players
- .yamato/_run-all.yml#run_all_project_tests_desktop_standalone
# Run Runtime tests on mobile players
- .yamato/_run-all.yml#run_all_project_tests_mobile_standalone
# Run Runtime tests on console players
- .yamato/_run-all.yml#run_all_project_tests_console_standalone
# Build player for webgl platform on trunk
- .yamato/_run-all.yml#run_all_webgl_builds
# Run code coverage test
- .yamato/code-coverage.yml#code_coverage_ubuntu_trunk