Skip to content

Commit 644423c

Browse files
rabernatjhammand-v-b
authored
create hatch test env (#1650)
* create hatch test env * add other test deps and github worklow * skip bsddb3 test * Update pyproject.toml --------- Co-authored-by: Joe Hamman <[email protected]> Co-authored-by: Davis Bennett <[email protected]>
1 parent 26cd9fa commit 644423c

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.github/workflows/test-v3.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Test V3
5+
6+
on:
7+
push:
8+
branches: [ v3 ]
9+
pull_request:
10+
branches: [ v3 ]
11+
12+
jobs:
13+
run-tests:
14+
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.11'
22+
cache: 'pip'
23+
- name: Install Hatch
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install hatch
27+
- name: Set Up Hatch Env
28+
run: |
29+
hatch env create
30+
- name: Run Tests
31+
run: |
32+
hatch run test:run

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,24 @@ omit = [
7676
version.source = "vcs"
7777
build.hooks.vcs.version-file = "src/zarr/_version.py"
7878

79+
[tool.hatch.envs.test]
80+
extra-dependencies = [
81+
"attrs",
82+
"cattrs",
83+
"coverage",
84+
"pytest",
85+
"pytest-cov",
86+
"msgpack",
87+
"lmdb",
88+
"zstandard",
89+
"crc32c",
90+
"pytest-asyncio"
91+
]
92+
93+
[tool.hatch.envs.test.scripts]
94+
run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
95+
run = "run-coverage --no-cov"
96+
7997
[tool.ruff]
8098
line-length = 100
8199
exclude = [

tests/test_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ def test_nbytes_stored(self):
20402040
pass # not implemented
20412041

20422042

2043+
@pytest.mark.skip(reason="can't get bsddb3 to work on CI right now")
20432044
class TestArrayWithDBMStoreBerkeleyDB(TestArray):
20442045
def create_store(self):
20452046
bsddb3 = pytest.importorskip("bsddb3")

0 commit comments

Comments
 (0)