Add doc-only change detection to skip tests#2922
Merged
copybara-service[bot] merged 1 commit intomainfrom Jan 9, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ca82601 to
408460e
Compare
|
🤖 Hi @hengtaoguo, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
da597ec to
d6a8739
Compare
9e2c9d5 to
5615804
Compare
|
🤖 Hi @hengtaoguo, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
This pull request introduces a valuable optimization to the CI pipeline by skipping tests for documentation-only changes. The implementation is mostly correct, but contains a critical bug in the final job that aggregates test results.
🔍 General Feedback
- The
doc_only_checkjob is well-implemented and uses a correct method to determine which files have changed. - The new
all_tests_passedjob is a good idea for simplifying branch protection rules. However, the logic for checking for failed or cancelled jobs is incorrect and needs to be fixed for it to work as intended.
5d37c2f to
5615804
Compare
SurbhiJainUSC
approved these changes
Jan 9, 2026
70cf228 to
7123147
Compare
NuojCheng
reviewed
Jan 9, 2026
NuojCheng
approved these changes
Jan 9, 2026
1e4df0a to
502f289
Compare
- Add doc-only-check job to detect when only .md files are modified - Skip build and all test jobs when only documentation changes - Tests only run when build succeeds (not skipped) - Non-PR events (schedule, workflow_dispatch) always run all tests
d5992a9 to
67a2833
Compare
dipannita08
approved these changes
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
doc_only_checkjob to detect when only.md|ipynbfiles are modified (Later, you can skip more file types such asjpg|png|mp4if needed):skip_tests==true: Skip the build process and all unit tests.skip_tests==false: Execute all remaining build process and unit tests like before.Add
all_tests_passedto aggregate build and all unit tests status. Later in GitHub branch protection rule, we only check this test. Benefits of doing so:Tests
Skip test (doc-only): https://screenshot.googleplex.com/ANutL8W8zpaRP5e
Non-skip test (success): https://screenshot.googleplex.com/BKxyPkxUgAYZvxR
Non-skip test (failure): https://screenshot.googleplex.com/4JU7AtHVWpJ7SMT
Non-skip test (cancel): https://screenshot.googleplex.com/8om8PyDT3vSxJd3
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.