[CI] Run all tests when a base test changes (#7010)

This commit is contained in:
Keith Burzinski 2024-07-01 21:06:33 -05:00 committed by GitHub
parent 582386d3a2
commit 83f9664efb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -140,7 +140,10 @@ def get_components(files: list[str], get_dependencies: bool = False):
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
"-c", "--changed", action="store_true", help="Only run on changed files"
"-c",
"--changed",
action="store_true",
help="List all components required for testing based on changes",
)
parser.add_argument(
"-b", "--branch", help="Branch to compare changed files against"
@ -158,6 +161,8 @@ def main():
changed = changed_files(args.branch)
else:
changed = changed_files()
# If any base test file(s) changed, there's no need to filter out components
if not any("tests/test_build_components" in file for file in changed):
files = [f for f in files if f in changed]
for c in get_components(files, args.changed):