Skip to content

Commit

Permalink
chore: prepare codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Sep 14, 2024
1 parent 9a85632 commit e7ae41c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ jobs:
- name: Minimize uv cache
run: uv cache prune --ci

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
25 changes: 25 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
codecov:
require_ci_to_pass: true
allow_pseudo_compare: true
allow_coverage_offsets: true

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: false

coverage:
range: 60..90
round: down
precision: 0

status:
project:
default:
target: 80
patch:
default:
target: auto
threshold: 5
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ packages = ["src/timeout_executor"]
include = ["src/timeout_executor"]

[tool.pytest.ini_options]
addopts = "-n 4 --cov=src/timeout_executor --cov-report html"
addopts = "-n 4 --cov=src/timeout_executor --cov-report html --cov-report=xml"
testpaths = ["src/tests"]

[tool.coverage.report]
Expand Down

0 comments on commit e7ae41c

Please sign in to comment.