From af6ea71c787811cf4c11ebfccf758530140b8380 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 4 Oct 2024 13:19:22 -0600 Subject: [PATCH] run coverage during unit tests, require minimum coverage (#16372) --- pants.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pants.toml b/pants.toml index 12c7194790441..62e3b590932fa 100644 --- a/pants.toml +++ b/pants.toml @@ -18,6 +18,18 @@ unmatched_build_file_globs = "error" [black] config = "./pyproject.toml" +[coverage-py] +fail_under = 50 +filter = [ + 'llama-index-core/', + 'llama-index-experimental/', + 'llama-index-finetuning/', + 'llama-index-integrations/', + 'llama-index-utils/', +] +global_report = false +report = ["console", "html", "xml"] + [python] interpreter_constraints = ["==3.10.*", "==3.11.*", "==3.12.*", "==3.9.*"] @@ -27,3 +39,6 @@ ambiguity_resolution = "by_source_root" [source] marker_filenames = ["pyproject.toml"] root_patterns = ["*tests", "/"] + +[test] +use_coverage = true