Commit 2bb945c
committed
ci: Adding minimal required job set and validation preventing PRs from merging when tests are running (#3682)
This PR aims to address 3 problems that we currently have
1. Quite often if no checks are required it's easy to undertest a PR
which leads to simple whitespace errors and such. Because of that I
created `pr_minimal_required_checks` which consists of PVP checks and
standard check which I will require on all PRs as minimum
2. Emma noticed that PRs are allowed to be merged when jobs are running
but none yet failed. This is an issue created by
#3580
and the fact that we want to run CI conditionally (for example we don't
want to run it when we only have DOCS changes) so we had to remove PR
trigger as required job in branch protection rules. This creates a
problem that without required check PR is allowed to be merged until a
test fails
3. Another problem that I spotted is that Documentation~ folder is
actually located inside package folder so this check implemented there
won't work correctly either way
The solution that this PR proposes is implementation of 2 independent
checks (triggered by expression trigger) where
1. `pr_minimal_required_checks` will trigger on all PRs targetting
develop or release branches. It consist of simplest PVP and standards
checks
2. `pr_code_changes_checks` will trigger on PRs that are modifying files
under relevant package or project related paths (see expression trigger)
Those jobs WON'T be required by the branch protection rules but I
introduced new GitHub action of Yamato PR Supervisor which WILL be
required and how it works is that it monitors checks running on PRs and
will fail if any of them fails or pass if all checks are green. In this
way we can have a workflow that both runs only necessary tests but also
gates PRs from merging too early.
Note that you can still use `/ci ngo` comment trigger to run the check
on draft branch or branches not targeting develop nor release branches
After this is approved and merged I will add this check as required on
PRs in branch protection rules
N/A
Comments were added to the jobs (soon I also plan to create doc
describing our CI practices/learnings)
Playtest)
I tested scenarios with code changes and without code changes and the
workflow works as expected
Will do1 parent 1eca4b3 commit 2bb945c
2 files changed
+117
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
50 | 70 | | |
51 | 71 | | |
52 | 72 | | |
| |||
65 | 85 | | |
66 | 86 | | |
67 | 87 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 88 | | |
72 | | - | |
73 | | - | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | | - | |
| 92 | + | |
76 | 93 | | |
77 | | - | |
78 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
79 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
80 | 113 | | |
81 | 114 | | |
82 | 115 | | |
| |||
0 commit comments