Skipt test suite for doc-only changes#980
Conversation
8a4bcc3 to
57530ab
Compare
|
Conclusion: that the validation logic should be handled in "ready-to-ship", not in another check |
New conclusionThe check hangs when skipped because they are "required checks" by branch protection rules. This rule applies to main and all release branches. There are ways of bypassing this, but if we can bypass them, why have them in the first place? We could use only the "ready-to-ship" check and put the required logic there. ProposalAs this is an admin per-repository setting, I'm proposing of making this skip-doc-only-changes feature opt-in. [0] Protection rules are located in: Examples ways of bypassing but which are very messy
About the test PRsOn the pulp/pulp_rpm#4113 (doc only changes) test PR, I've created a branch that doesn't have those checks to assert that it will correctly skip and not hang waiting for checks. On the pulp/pulp_rpm#4112 (has code changes) test PR, the tests run as expected. On the default case where |
57530ab to
1f4af93
Compare
1f4af93 to
4e74142
Compare
181a3c3 to
8bd3317
Compare
| needs: check-changes | ||
| if: needs.check-changes.outputs.run_tests == '1' | ||
| {%- if pre_job_template %} | ||
| needs: {{ pre_job_template.name }} | ||
| needs: [check-changes, {{ pre_job_template.name }}] |
There was a problem hiding this comment.
| needs: check-changes | |
| if: needs.check-changes.outputs.run_tests == '1' | |
| {%- if pre_job_template %} | |
| needs: {{ pre_job_template.name }} | |
| needs: [check-changes, {{ pre_job_template.name }}] | |
| needs: | |
| - "check-changes" | |
| {%- if pre_job_template %} | |
| - "{{ pre_job_template.name }}" | |
| {%- endif %} | |
| if: needs.check-changes.outputs.run_tests == '1' |
The endif below needs to be removed...
This requires plugins to use only the 'ready-to-ship' job as a required check in their github repository settings. If there are other checks such as 'test / test (pulp)' the CI will report there are pending checks and will never be green.
8bd3317 to
a7c8230
Compare




Skip tests when there are no code changes.
Test PRs:
Important
This requires plugins to disable "required checks" (on the github repository settings) on anything but the
ready-to-shipjob. Otherwise, the checks will forever wait those required checks (which are checked in ready-to-ship).Example (
Settings > Branches > Branch Protection Rules):