mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
since there are multiple jacoco.xml files
possible and it's too hard to understand which one is the correct one for the class, I just log in the coverages each one that have the fully qualified class that is commented, it will then be up to us to filter out what's needed
This commit is contained in:
@ -13,7 +13,7 @@ class Metadata:
|
|||||||
pr_number: int
|
pr_number: int
|
||||||
merge_commit_sha: str # to checkout for the tests
|
merge_commit_sha: str # to checkout for the tests
|
||||||
commented_file : str
|
commented_file : str
|
||||||
commented_file_coverage: float = 0
|
commented_file_coverages: Dict[str, float] = field(default_factory=dict)
|
||||||
successful: bool = True
|
successful: bool = True
|
||||||
build_system: str = ""
|
build_system: str = ""
|
||||||
reason_for_failure: str = ""
|
reason_for_failure: str = ""
|
||||||
|
@ -143,12 +143,16 @@ def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir:
|
|||||||
entry.metadata.build_system = build_handler.get_type()
|
entry.metadata.build_system = build_handler.get_type()
|
||||||
build_handler.set_client(docker_client)
|
build_handler.set_client(docker_client)
|
||||||
|
|
||||||
|
def _check_coverages():
|
||||||
|
for coverage_file, coverage in build_handler.check_coverage(commented_file_path):
|
||||||
|
entry.metadata.commented_file_coverages[coverage_file] = coverage
|
||||||
|
|
||||||
steps = [
|
steps = [
|
||||||
("Checking for tests...", build_handler.check_for_tests),
|
("Checking for tests...", build_handler.check_for_tests),
|
||||||
("Compiling...", build_handler.compile_repo),
|
("Compiling...", build_handler.compile_repo),
|
||||||
("Running tests...", build_handler.test_repo),
|
("Running tests...", build_handler.test_repo),
|
||||||
("Generating coverage...", build_handler.generate_coverage_report),
|
("Generating coverage...", build_handler.generate_coverage_report),
|
||||||
("Checking coverage...", lambda: build_handler.check_coverage(commented_file_path)),
|
("Checking coverage...", _check_coverages),
|
||||||
]
|
]
|
||||||
|
|
||||||
with build_handler, tqdm(total=len(steps), desc="Processing PR", leave=False) as pbar:
|
with build_handler, tqdm(total=len(steps), desc="Processing PR", leave=False) as pbar:
|
||||||
|
Reference in New Issue
Block a user