From 3bec8d587f642636edd5bcf3ed42accd4eea8f1b Mon Sep 17 00:00:00 2001 From: Petru Arakiss Date: Fri, 6 Dec 2024 03:23:38 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20enhance=20CI=20with=20Codec?= =?UTF-8?q?ov=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ feat: enhance CI with Codecov integration 🔧 CI Configuration: - Added Codecov token and verbose output to CI workflow. - Configured Codecov to fail CI if errors are encountered. - Set specific flags and name for Codecov reporting. ✨ Codecov Configuration: - Introduced a new codecov.yml file for detailed configuration. - Specified coverage requirements and thresholds for project and patch. - Configured comment layout and parser settings for better reporting. These changes significantly enhance the CI workflow by integrating Codecov for improved coverage reporting and management. --- .github/workflows/ci.yml | 5 +++++ codecov.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 225f3c7..32857fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,12 @@ jobs: uses: codecov/codecov-action@v3 with: file: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true + verbose: true + flags: unittests + name: codecov-umbrella + override_branch: ${{ github.ref_name }} build: name: Build Package diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..2000baf --- /dev/null +++ b/codecov.yml @@ -0,0 +1,31 @@ +codecov: + require_ci_to_pass: yes + notify: + wait_for_ci: yes + +coverage: + precision: 2 + round: down + range: "70...100" + status: + project: + default: + target: 80% # the required coverage value + threshold: 1% # the leniency in hitting the target + patch: + default: + target: 80% + threshold: 1% + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "reach,diff,flags,tree" + behavior: default + require_changes: no \ No newline at end of file