From 70d29d94bd5eb42e8a8695f1c0c4470de246c37f Mon Sep 17 00:00:00 2001 From: Shay Palachy Date: Wed, 16 Jul 2025 15:54:50 +0300 Subject: [PATCH 1/4] Fix .codecov.yml --- .codecov.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 1b6a5955..6327b98e 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -3,21 +3,25 @@ codecov: require_ci_to_pass: yes coverage: + range: 70..100 precision: 2 round: down - range: "70...100" - ignore: Tests - status: - project: - default: - target: auto - threshold: 0% - patch: - default: - target: 97% + ignore: + - "tests/**" + - "**/_version.py" + - "**/__init__.py" + +status: + project: # overall coverage + default: + target: auto # fail on any drop + threshold: 0% # or 0.5 % if you want slack + patch: # changed lines + default: + target: 97% comment: - layout: "header, changes, diff" + layout: header, changes, diff behavior: default require_changes: false branches: null From 1d2b6c1934a72573a1cc0ecaa1759e98c7fd7984 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 12:55:24 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .codecov.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 6327b98e..68324d4e 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -12,11 +12,11 @@ coverage: - "**/__init__.py" status: - project: # overall coverage + project: # overall coverage default: - target: auto # fail on any drop - threshold: 0% # or 0.5 % if you want slack - patch: # changed lines + target: auto # fail on any drop + threshold: 0% # or 0.5 % if you want slack + patch: # changed lines default: target: 97% From 5e664b7604b90ee6f3cfe3104e0f9f8ae15c14c5 Mon Sep 17 00:00:00 2001 From: Shay Palachy Date: Wed, 16 Jul 2025 16:07:26 +0300 Subject: [PATCH 3/4] Separate codecov steps for PRs and non-PRs --- .github/workflows/ci-test.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index a4cfd86c..e8c5c430 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -144,15 +144,26 @@ jobs: if: matrix.backend == 'redis' run: pytest -m redis --cov=cachier --cov-report=term --cov-report=xml:cov.xml - - name: Upload coverage to Codecov + - name: Upload coverage to Codecov (non-PRs) + if: github.event_name != 'pull_request' # pushes, scheduled, etc. continue-on-error: true uses: codecov/codecov-action@v5 with: fail_ci_if_error: true - name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} # required flags: ${{ matrix.backend }} + # We need a separate step for PRs because PRs do not have access to + # secrets; hence, provide the token will give it an empty value, + # resulting in an authentication error. + - name: Upload coverage to Codecov (PRs) + if: github.event_name == 'pull_request' # PRs only + continue-on-error: true + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + flags: ${{ matrix.backend }} + testing-guardian: runs-on: ubuntu-latest needs: pytester From 76aff56b925167b1b73677d1815bc699f536d2b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 13:07:40 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/ci-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index e8c5c430..9be4d3e8 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -145,7 +145,7 @@ jobs: run: pytest -m redis --cov=cachier --cov-report=term --cov-report=xml:cov.xml - name: Upload coverage to Codecov (non-PRs) - if: github.event_name != 'pull_request' # pushes, scheduled, etc. + if: github.event_name != 'pull_request' # pushes, scheduled, etc. continue-on-error: true uses: codecov/codecov-action@v5 with: