Skip to content

Commit 37040f3

Browse files
committed
Add mypy check to CI
1 parent dc4375a commit 37040f3

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ jobs:
4444
run: tox -e docs
4545
env:
4646
PYTHON_ISAL_LINK_DYNAMIC: True
47+
mypy:
48+
needs: lint
49+
runs-on: ubuntu-20.04
50+
steps:
51+
- uses: actions/[email protected]
52+
with:
53+
submodules: recursive
54+
- name: Set up Python 3.6
55+
uses: actions/[email protected]
56+
with:
57+
python-version: 3.6
58+
- name: Install isal
59+
run: sudo apt-get install libisal-dev
60+
- name: Install tox and upgrade setuptools and pip
61+
run: pip install --upgrade tox setuptools pip
62+
- name: Mypy checks
63+
run: tox -e mypy
64+
env:
65+
PYTHON_ISAL_LINK_DYNAMIC: True
4766
twine_check:
4867
needs: lint
4968
runs-on: ${{ matrix.os }}

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ commands=
4242
# pytest dep needed for mypy check
4343
deps=flake8
4444
flake8-import-order
45-
mypy
46-
pytest
45+
skip_install=True
4746
commands =
4847
flake8 src tests setup.py benchmark.py
48+
49+
[testenv:mypy]
50+
# pytest dep needed for mypy check
51+
deps=mypy
52+
pytest
53+
commands =
4954
mypy src/ tests/
5055

5156
# Documentation should build on python version 3

0 commit comments

Comments
 (0)