Skip to content

Commit 1f94dca

Browse files
Merge pull request #10 from tomwhite/ci
Basic CI for tests
2 parents 9913ead + f6afba8 commit 1f94dca

File tree

2 files changed

+76
-2
lines changed

2 files changed

+76
-2
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
# Use macos-13 because pip binary packages for ARM aren't
16+
# available for many dependencies
17+
os: [macos-13, macos-14, ubuntu-latest]
18+
python-version: ["3.9", "3.10", "3.11"]
19+
exclude:
20+
# Just run macos tests on one Python version
21+
- os: macos-13
22+
python-version: "3.10"
23+
- os: macos-13
24+
python-version: "3.11"
25+
- os: macos-14
26+
python-version: "3.9"
27+
- os: macos-14
28+
python-version: "3.10"
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
python -m pip install '.[dev]'
39+
- name: Run tests
40+
run: |
41+
pytest
42+
43+
packaging:
44+
name: Packaging
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-python@v5
49+
with:
50+
python-version: '3.11'
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
python -m pip install build twine validate-pyproject[all]
55+
- name: Check and install package
56+
run: |
57+
validate-pyproject pyproject.toml
58+
python -m build
59+
python -m twine check --strict dist/*
60+
python -m pip install dist/*.whl
61+
- name: Check vcztools CLI
62+
run: |
63+
vcztools --help
64+
python -m vcztools --help

pyproject.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ build-backend = "setuptools.build_meta"
66
name = "vcztools"
77
version = "0.0.1"
88
dependencies = [
9-
"numpy>=1.23.5",
9+
"numpy>=1.23.5,<2",
10+
"numba",
11+
"zarr>=2.17,<3",
12+
"click",
1013
]
1114
requires-python = ">=3.9"
1215

1316
[project.scripts]
14-
vcztools = "vcztools.__main__:main"
17+
vcztools = "vcztools.cli:vcztools_main"
18+
19+
[project.optional-dependencies]
20+
dev = [
21+
"bio2zarr @ git+https://github.com/sgkit-dev/bio2zarr.git",
22+
"pytest",
23+
"pytest-datadir",
24+
]
1525

1626
[tool.setuptools]
1727
packages = ["vcztools"]

0 commit comments

Comments
 (0)