Skip to content

Commit c578963

Browse files
maxrjonesjhamman
andauthored
Add test matrix for V3 (#1656)
* Add a test matrix for Zarr V3 * Run mypy in test matrix * Simplify matrix * Update .github/workflows/test-v3.yml Co-authored-by: Joe Hamman <[email protected]> --------- Co-authored-by: Joe Hamman <[email protected]>
1 parent c69ac31 commit c578963

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

.github/workflows/test-v3.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ jobs:
2929
hatch env create
3030
- name: Run Tests
3131
run: |
32-
hatch run test:run
32+
hatch run test:run
33+
- name: Run mypy
34+
continue-on-error: true
35+
run: |
36+
hatch run test:run-mypy

pyproject.toml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ docs = [
5353
'numpydoc',
5454
'numcodecs[msgpack]',
5555
]
56+
extra = [
57+
'attrs',
58+
'cattrs',
59+
'msgpack',
60+
'crc32c',
61+
'zstandard'
62+
]
63+
optional = [
64+
'lmdb',
65+
]
5666

5767
[project.urls]
5868
"Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues"
@@ -79,22 +89,29 @@ build.hooks.vcs.version-file = "src/zarr/_version.py"
7989

8090
[tool.hatch.envs.test]
8191
extra-dependencies = [
82-
"attrs",
83-
"cattrs",
8492
"coverage",
8593
"pytest",
8694
"pytest-cov",
87-
"msgpack",
88-
"lmdb",
89-
"zstandard",
90-
"crc32c",
91-
"pytest-asyncio"
95+
"pytest-asyncio",
96+
"mypy",
9297
]
98+
features = ["extra"]
99+
100+
[[tool.hatch.envs.test.matrix]]
101+
python = ["3.10", "3.11"]
102+
numpy = ["1.24", "1.26"]
103+
version = ["minimal"]
104+
105+
[[tool.hatch.envs.test.matrix]]
106+
python = ["3.10", "3.11"]
107+
numpy = ["1.24", "1.26"]
108+
features = ["optional"]
93109

94110
[tool.hatch.envs.test.scripts]
95111
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
96112
run = "run-coverage --no-cov"
97113
run-verbose = "run-coverage --verbose"
114+
run-mypy = "mypy src"
98115

99116
[tool.hatch.envs.docs]
100117
features = ['docs']

0 commit comments

Comments
 (0)