Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading