You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: [Backport] Adding minimal required job set and validation preventing PRs from merging when tests are running (#3691)
## Purpose of this PR
This is a backport of
#3682.
Same description apply
### Jira ticket
N/A
## Documentation
Same as original PR
## Testing & QA (How your changes can be verified during release
Playtest)
Same as original PR
## Backports
This is a backport of
#3682
# GitHub Actions workflow to monitor Yamato CI job state on pull requests
2
+
# We are using https://cli.github.com/manual/gh_pr_checks
3
+
# The aim is to ensure that conditionally triggered Yamato jobs are completed successfully before allowing merges
4
+
5
+
# This job will be required in branch protection rules for develop, develop-2.0.0, and release/* branches. It's only goal will be to ensure that Yamato jobs are completed successfully before allowing Pr to merge.
6
+
# Note that conditional jobs will have 30s to show which is always the cas since they are showing up as soon as in distribution stage.
# This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
14
-
# Focuses on critical validation paths that we should validate before merging PRs. It also cancels previous runs on new commits
15
-
# By default it's triggered if
15
+
# We have two PR triggers:
16
+
# 1) Minimal PR checks that run on all PRs (even if only docs are changed)
17
+
# 2) More extensive pr_code_changes_checks that run if code is changed. This test validates Standards, Package tests, Project tests and Desktop standalone tests to ensure that main platforms are covered
18
+
# By default pr_minimal_required_checks it's triggered if
16
19
# 1) PR targets develop, develop-2.0.0 or release branches
17
20
# 2) PR is not a draft
18
-
# 3) PR changes files in package or testproject folders (doesn't run on for example DOCS only changes)
19
-
20
-
# Note that in other cases you can trigger it by writing a comment "/ci ngo" in the PR thread
21
+
# Then pr_code_changes_checks it's triggered if the same conditions apply plus:
22
+
# 1) PR changes code in com.unity.netcode.gameobjects package (Editor, Runtime or Tests folders) or in testproject folder or package.json file
21
23
22
24
# Nightly:
23
25
# This test validates same subset as pull_request_trigger with addition of mobile/console tests and webgl builds
@@ -39,14 +41,32 @@
39
41
# 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.
# 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
47
+
# This trigger was created to ensure that ALL PRs run this minimal check even when we don't need to run full tests
# Run all relevant tasks when a pull request targeting the develop or release branch is created or updated.
46
64
# 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.
47
-
# Since standards job is a part of initial checks it's not present as direct dependency here
# 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.
66
+
# This optimization allows to speed up feedback look for any "obvious" errors and save resources.
67
+
# Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!!
68
+
pr_code_changes_checks:
69
+
name: Code changes PR checks
50
70
# Run the following tests on a selection of different desktop platforms
51
71
dependencies:
52
72
# Run package EditMode and Playmode package tests on 6000.2 (latest supported editor) and an older supported editor (2022.3) (2022.3 will soon be a minimum supported editor)
@@ -65,18 +85,31 @@ pull_request_trigger:
65
85
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
0 commit comments