File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 99logger = logging .getLogger (__name__ )
1010
1111# We ignore .md files and GitHub workflows and app/modules to detect the scope of the changes
12- IGNORE_PATHS_START = ("app/modules/" , ".github/" )
12+ IGNORE_PATHS_START = ("app/modules/" , "tests/modules/" , " .github/" )
1313IGNORE_EXTENSIONS = (".md" ,)
1414
1515
@@ -30,9 +30,18 @@ def detect_modules(changed_files):
3030 modules = set ()
3131 for f in changed_files :
3232 logger .info (f"Changed file: { f } " )
33+ # We want to detect changes in app/modules/<module_name>/...
3334 if f .startswith ("app/modules/" ):
3435 module = f .split ("/" )[2 ]
3536 modules .add (module )
37+ # Or the modification of tests in tests/modules/<module_name>/... or tests/modules/test_<module_name>*.py
38+ elif f .startswith ("tests/modules/" ):
39+ parts = f .split ("/" )
40+ if parts [2 ].startswith ("test_" ):
41+ module = parts [2 ][5 :].split ("." )[0 ].split ("_" )[0 ]
42+ else :
43+ module = parts [2 ]
44+ modules .add (module )
3645 return sorted (modules )
3746
3847
You can’t perform that action at this time.
0 commit comments