Skip to content

Commit f94cbc8

Browse files
committed
Removed allcheckspassed GitHub action and added spare checkout rule for Yamato job
1 parent 1d8fdfb commit f94cbc8

File tree

3 files changed

+31
-41
lines changed

3 files changed

+31
-41
lines changed

.github/workflows/all-checks-pass.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/com.unity.netcde.gameobjects/
2+
/testproject/

.yamato/_triggers.yml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,39 @@
4242

4343
#-----------------------------------------------------------------------------------
4444

45-
# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures
46-
# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests
47-
minimal_required_checks_trigger:
48-
name: Minimal PR check (develop, develop-2.0.0 & release branches)
45+
pull_request_trigger:
46+
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
47+
# Run the following tests on a selection of different desktop platforms
4948
dependencies:
50-
- .yamato/package-pack.yml#package_pack_-_ngo_win
51-
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
49+
- .yamato/_triggers#minimal_required_checks
50+
- .yamato/_triggers#code_changes_check
5251
triggers:
52+
# Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered
53+
# TODO: consider setting up and running tests from Examples/
54+
# TODO: or docs only changes are spelling/link check
5355
expression: |-
54-
(pull_request.target eq "develop" OR
56+
pull_request.comment eq "ngo" OR
57+
((pull_request.target eq "develop" OR
5558
pull_request.target eq "develop-2.0.0" OR
5659
pull_request.target match "release/*") AND
5760
NOT pull_request.draft
5861
cancel_old_ci: true
5962

63+
# After some experimenting with CI setups we discovered that even though sometimes we don't need CI to run (no reason to run package tests if only Documentation is changed) there are some checks that devs may not realize but changes in seemingly unrelated files will cause their failures
64+
# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests
65+
minimal_required_checks:
66+
name: Minimal PR check (develop, develop-2.0.0 & release branches)
67+
dependencies:
68+
- .yamato/package-pack.yml#package_pack_-_ngo_win
69+
- .yamato/project-standards.yml#standards_ubuntu_testproject_trunk
70+
6071
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
6172
# 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.
6273
# This job will FIRST run "run_quick_checks" jobs (defined in _run-all.yml) since it's the dependency of project pack jobs which is on the lowest dependency tier. This runs the fastest checks (like PVP or code standards) and ONLY IF those pass it will run the rest of the tests.
6374
# This optimization allows to speed up feedback look for any "obvious" errors and save resources.
6475
# Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!!
65-
pull_request_trigger:
66-
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
76+
code_changes_check:
77+
name: Package/Project Changes Trigger (develop, develop-2.0.0, & release branches)
6778
# Run the following tests on a selection of different desktop platforms
6879
dependencies:
6980
# Run package EditMode and Playmode package tests on trunk and an older supported editor (6000.0)
@@ -78,19 +89,15 @@ pull_request_trigger:
7889
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
7990
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0
8091
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk
81-
triggers:
82-
# Note that PR tests will run ONLY if we are changing package/sample code. If changes are let's say docs only no tests will be triggered
83-
# TODO: consider setting up and running tests from Examples/
84-
# TODO: or docs only changes are spelling/link check
85-
expression: |-
86-
pull_request.comment eq "ngo" OR
87-
((pull_request.target eq "develop" OR
88-
pull_request.target eq "develop-2.0.0" OR
89-
pull_request.target match "release/*") AND
90-
NOT pull_request.draft AND
91-
(pull_request.changes.any match "com.unity.netcode.gameobjects/**" OR
92-
pull_request.changes.any match "testproject/**"))
93-
cancel_old_ci: true
92+
source:
93+
files:
94+
sparse_checkout_rules: .sparse-checkout-rules/pr-triger.patterns
95+
96+
97+
98+
99+
100+
94101

95102
# Run all tests on trunk on nightly basis.
96103
# Same subset as pull_request_trigger with addition of mobile/desktop/console tests and webgl builds

0 commit comments

Comments
 (0)