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
1 change: 1 addition & 0 deletions .github/workflows/gpu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ jobs:
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: gpu
verbose: true # optional (default = false)
1 change: 1 addition & 0 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
verbose: true # optional (default = false)

- name: Generate and publish the report
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
verbose: true # optional (default = false)

test-upstream-and-min-deps:
Expand Down Expand Up @@ -110,6 +111,7 @@ jobs:
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
verbose: true # optional (default = false)

doctests:
Expand Down
14 changes: 13 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ coverage:
default:
target: auto
threshold: 0.1
flags:
- tests
flags:
tests:
paths:
- src/
carryforward: true
gpu:
paths:
- src/
carryforward: true
codecov:
notify:
after_n_builds: 10 # Wait for all 10 reports before updating the status
# 6 = test.yml: 3 (optional+ubuntu) + 2 (upstream + min_deps), hypothesis: 1
after_n_builds: 6
wait_for_ci: yes
comment:
layout: "diff, files"
Expand Down
29 changes: 19 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ hooks.vcs.version-file = "src/zarr/_version.py"
dependency-groups = ["test"]

[tool.hatch.envs.test.env-vars]
# Required to test with a pytest plugin; see https://pytest-cov.readthedocs.io/en/latest/plugins.html
COV_CORE_SOURCE = "src"
COV_CORE_CONFIG = ".coveragerc"
COV_CORE_DATAFILE = ".coverage.eager"

[[tool.hatch.envs.test.matrix]]
python = ["3.12", "3.13", "3.14"]
Expand All @@ -175,13 +171,23 @@ matrix.deps.dependency-groups = [
]

[tool.hatch.envs.test.scripts]
run-coverage = "pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report xml --junitxml=junit.xml -o junit_family=legacy"
run-coverage-html = "pytest --cov-config=pyproject.toml --cov=src --cov-append --cov-report html"
run = "run-coverage --no-cov --ignore tests/benchmarks"
run-coverage = [
"coverage run --source=src -m pytest --junitxml=junit.xml -o junit_family=legacy {args:}",
"coverage xml",
]
run-coverage-html = [
"coverage run --source=src -m pytest {args:}",
"coverage html",
]
run = "pytest --ignore tests/benchmarks"
run-verbose = "run-coverage --verbose"
run-mypy = "mypy src"
run-hypothesis = "run-coverage -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful*"
run-hypothesis = [
"coverage run --source=src -m pytest -nauto --run-slow-hypothesis tests/test_properties.py tests/test_store/test_stateful* {args:}",
"coverage xml",
]
run-benchmark = "pytest --benchmark-enable tests/benchmarks"
serve-coverage-html = "python -m http.server -d htmlcov 8000"
list-env = "pip list"

[tool.hatch.envs.gputest]
Expand All @@ -195,8 +201,11 @@ features = ["gpu"]
python = ["3.12", "3.13"]

[tool.hatch.envs.gputest.scripts]
run-coverage = "pytest -m gpu --cov-config=pyproject.toml --cov=src --cov-report xml --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks"
run = "run-coverage --no-cov"
run-coverage = [
"coverage run --source=src -m pytest -m gpu --junitxml=junit.xml -o junit_family=legacy --ignore tests/benchmarks {args:}",
"coverage xml",
]
run = "pytest -m gpu --ignore tests/benchmarks"

[tool.hatch.envs.upstream]
template = 'test'
Expand Down
Loading