mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
not compiling, testing, etc. for files that are
not code related
This commit is contained in:
@ -342,24 +342,28 @@ def process_pull(
|
|||||||
("Checking coverage...", _check_coverages),
|
("Checking coverage...", _check_coverages),
|
||||||
]
|
]
|
||||||
|
|
||||||
with build_handler:
|
if all(not entry.files[comment.file].is_code_related for comment in entry.comments):
|
||||||
try:
|
# if the commented files are all not code related, why bother compiling and testing the code?
|
||||||
for message, action in steps:
|
pbar.update(5)
|
||||||
pbar.set_postfix(
|
else:
|
||||||
{
|
with build_handler:
|
||||||
"doing": message,
|
try:
|
||||||
"started at": datetime.now().strftime("%d/%m, %H:%M:%S"),
|
for message, action in steps:
|
||||||
}
|
pbar.set_postfix(
|
||||||
)
|
{
|
||||||
action()
|
"doing": message,
|
||||||
pbar.update(1)
|
"started at": datetime.now().strftime("%d/%m, %H:%M:%S"),
|
||||||
except HandlerException as e:
|
}
|
||||||
entry.metadata.last_cmd_error_msg = str(e)
|
)
|
||||||
entry.metadata.reason_for_failure = e.reason_for_failure
|
action()
|
||||||
entry.metadata.successful = False
|
pbar.update(1)
|
||||||
finally:
|
except HandlerException as e:
|
||||||
build_handler.clean_repo()
|
entry.metadata.last_cmd_error_msg = str(e)
|
||||||
reset_repo_to_latest_commit(repo_path)
|
entry.metadata.reason_for_failure = e.reason_for_failure
|
||||||
|
entry.metadata.successful = False
|
||||||
|
finally:
|
||||||
|
build_handler.clean_repo()
|
||||||
|
reset_repo_to_latest_commit(repo_path)
|
||||||
|
|
||||||
if entry.metadata.successful:
|
if entry.metadata.successful:
|
||||||
entry.metadata.reason_for_failure = "" # was set to 'still processing', since it's done being processed and was successful, there are no reasons for failure
|
entry.metadata.reason_for_failure = "" # was set to 'still processing', since it's done being processed and was successful, there are no reasons for failure
|
||||||
|
Reference in New Issue
Block a user