Run test only from modified files

This commit is contained in:
János Benjamin Antal 2024-08-12 13:30:25 +00:00
parent 79a964bfff
commit 34643ee16c

View File

@ -69,9 +69,9 @@ def get_changed_tests_to_run(pr_info, repo_path):
return []
for fpath in changed_files:
if "tests/integration/test_" in fpath:
if re.search("tests/integration/test_.*/test.*\.py", fpath) is not None:
logging.info("File %s changed and seems like integration test", fpath)
result.add(fpath.split("/")[2])
result.add("/".join(fpath.split("/")[2:]))
return filter_existing_tests(result, repo_path)