From e927834108464451de410804e6f255cda93224ca Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Fri, 20 May 2022 08:33:34 +0200 Subject: [PATCH 1/3] ci(CodeCoverage): split code coverage reporting in mandatory and optional areas --- codecov.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index 33f6aec9f..1ae6e252a 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -2,10 +2,24 @@ coverage: status: project: default: - # Commits pushed to master should not make the overall - # project coverage decrease by more than 1%: + # by default, we only care about test coverage of the main + # rust crates target: auto threshold: 1% + paths: + - "crates" + bindings: + # Coverage of binding tests is recorded but for informational + # purposes only + informational: true + paths: + - "bindings" + labs: + # Coverage of lab tests is recorded but for informational + # purposes only + informational: true + paths: + - "labs" patch: default: # Be tolerant on slight code coverage diff on PRs to limit From 81db9ef4ca4b3cf610bd4d46e2d10435a5500ca5 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Fri, 20 May 2022 08:34:56 +0200 Subject: [PATCH 2/3] ci(CodeCoverage): Remove patch-level coverage reporting --- codecov.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index 1ae6e252a..dff46c0a3 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -20,11 +20,4 @@ coverage: informational: true paths: - "labs" - patch: - default: - # Be tolerant on slight code coverage diff on PRs to limit - # noisy red coverage status on github PRs. - # Note: The coverage stats are still uploaded - # to codecov so that PR reviewers can see uncovered lines - target: auto - threshold: 1% + patch: off From dd1f81770139596781caaf98c253e4dd79dfa859 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Fri, 20 May 2022 10:26:31 +0200 Subject: [PATCH 3/3] ci(CodeCoverage): exclude ffi & wasm from default project --- codecov.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/codecov.yaml b/codecov.yaml index dff46c0a3..cf8225819 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -7,17 +7,29 @@ coverage: target: auto threshold: 1% paths: - - "crates" + - "crates/matrix-sdk/" + - "crates/matrix-sdk-appservice/" + - "crates/matrix-sdk-base/" + - "crates/matrix-sdk-common/" + - "crates/matrix-sdk-crypto/" + - "crates/matrix-sdk-qrcode/" + - "crates/matrix-sdk-sled/" + - "crates/matrix-sdk-store-encryption/" + # Coverage of wasm tests isn't supported at the moment, + # see rustwasm/wasm-bindgen#2276 + # - "crates/matrix-sdk-indexeddb" bindings: # Coverage of binding tests is recorded but for informational # purposes only informational: true paths: - - "bindings" + - "bindings/" + - "crates/matrix-sdk-crypto-ffi/" + - "crates/matrix-sdk-ffi/" labs: # Coverage of lab tests is recorded but for informational # purposes only informational: true paths: - - "labs" + - "labs/" patch: off