Skip to content

Commit 2d7d1b2

Browse files
committed
CI: Add typing test to GitHub actions
1 parent 5b972c8 commit 2d7d1b2

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.github/workflows/misc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
python-version: ["3.10"]
2626
install: ['pip']
27-
check: ['style', 'doctest']
27+
check: ['style', 'doctest', 'typing']
2828
pip-flags: ['']
2929
depends: ['REQUIREMENTS']
3030
env:

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ test = [
6868
"pytest-httpserver",
6969
"pytest-xdist",
7070
]
71+
typing = ["mypy", "pytest", "types-setuptools", "types-Pillow", "pydicom"]
7172
zstd = ["pyzstd >= 0.14.3"]
7273

7374
[tool.hatch.build.targets.sdist]

tools/ci/check.sh

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ elif [ "${CHECK_TYPE}" == "test" ]; then
2525
cp ../.coveragerc .
2626
pytest --doctest-modules --doctest-plus --cov nibabel --cov-report xml \
2727
--junitxml=test-results.xml -v --pyargs nibabel -n auto
28+
elif [ "${CHECK_TYPE}" == "typing" ]; then
29+
mypy nibabel
2830
else
2931
false
3032
fi

0 commit comments

Comments
 (0)