-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ci: skip running builds and tests if no code changed #8768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
/kind misc |
Note that the tests will still run on this PR since Github Actions only applies the rules from workflows as defined in the target branch. |
on: [pull_request] # yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
paths-ignore: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for the paths-ignore
configuration is here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good start I think
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' # If the PR only modifies the documentation, there is no need to run builds and code tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option here which which would reduce the runs even more would be to instead use '**.md
, since that would include things like README.md
or roadmap.md
. However I am not sure if that is too liberal a policy. There are a number of other markdown files in the repo for which changes may warrant running tests for reasons I am not privy to.
$ find . -name '*md' | rg -v ./vendor | rg -v ./docs
./.github/ISSUE_TEMPLATE/feature-request.md
./.github/ISSUE_TEMPLATE/free-form.md
./.github/ISSUE_TEMPLATE/promotion-request.md
./.github/ISSUE_TEMPLATE/bug-report.md
./.github/pull_request_template.md
./cmd
./cmd/entrypoint/README.md
./cmd/nop/README.md
./code-of-conduct.md
./examples/README.md
./hack/README.md
./tekton/README.md
./tekton/release-cheat-sheet.md
./test/custom-task-ctrls/wait-task-beta/README.md
./test/custom-task-ctrls/wait-task-beta/cmd
./test/resolver-with-timeout/README.md
./test/README.md
./topical-ownership.md
./CONTRIBUTING.md
./api_compatibility_policy.md
./roadmap.md
./DEVELOPMENT.md
./README.md
./releases.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think **md should be ok but depends on if any of the tests are testing the md files as you mentioned. Once we know that for sure we can use **md. +1 for the current defensive approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think we have some checks on the docs (like deadlink) or we used to.
Out of curiosity, can we skip some jobs instead ? Worst case, we could have a "docs" workflow with the opposite filter.
Yeah if there are docs CI tests we can use a separate filter. Do you know where the docs tests are found or called? I didn't see any inside this file, and outside of verify-codegen it looked like all the tests were unit tests |
on: [pull_request] # yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
paths-ignore: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good start I think
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' # If the PR only modifies the documentation, there is no need to run builds and code tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think **md should be ok but depends on if any of the tests are testing the md files as you mentioned. Once we know that for sure we can use **md. +1 for the current defensive approach.
/approve |
@vdemeester: GitHub didn't allow me to request PR reviews from the following users: AlanGreene. Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester, waveywaves The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
Skip running builds and tests on pull requests if the pull request only changes documentation. From what I can tell, there are no e2e tests in use right now triggered by the
Tekton Integration
workflow which analyze the markdown docs files except the codegen test which checks to ensure the Pipeline api file was updated, however that should only be updated if the pipelines api is changed in the code. The tests themselves take some time. Also, while the Workflows may be free for compute since they're on GHA, they are still unnecessary and if the e2e tests use any ancillary services which have cost (maybe caching, coverage, image hosting, etc) unnecessary runs at least have the potential of incurring cost.Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes