googleapis / googleapis/synthtool
Fine grained presubmit sample tests
- Dominant language
- Python
- Stars
- 108
- Forks
- 102
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
Some library+sample repos (such as [python-aiplatform](https://github.com/googleapis/python-aiplatform/tree/master/samples/snippets)) has many samples and sample tests, which are frequently updated even if the library itself has not changed. Presubmit checks would run all the sample tests even if a PR modifies only a few samples. Some sample tests take a long time to run often causing the presubmit checks to take up to an hour.
**Describe the solution you'd like**
Ideally, PR presubmit sample test runs should run only the modified sample tests and the samples tests whose corresponding samples have been modified in the PR.
If a PR changes anything outside of the samples folder, all sample tests should run. (This is already the current behavior.)
**Describe alternatives you've considered**
Alternatively, the granularity could be at directory level: PR presubmit sample test runs should run only sample tests in subdirectories that have been changed in the PR whenever all changes in the PR are in the top level samples folder.
Contributor guide
Assessment
This issue has not been assessed yet.