general/ci: mypy check tests

This commit is contained in:
Dima Gerasimov 2023-02-20 23:57:31 +00:00 committed by karlicoss
parent c63177e186
commit 07e7c62d02
7 changed files with 37 additions and 14 deletions

12
tox.ini
View file

@ -80,7 +80,7 @@ allowlist_externals = cat
commands =
pip install -e .[testing,optional]
pip install orgparse # used it core.orgmode?
# todo add tests?
{envpython} -m mypy --install-types --non-interactive \
-p my.core \
--txt-report .coverage.mypy-core \
@ -88,10 +88,16 @@ commands =
{posargs}
cat .coverage.mypy-core/index.txt
# todo hmm might be better to move modules test in a separate subpackage?
{envpython} -m mypy --install-types --non-interactive \
tests \
--exclude 'tests/(bluemaestro|emfit|takeout|pdfs|jawbone).py'
# specific modules that are known to be mypy compliant (to avoid false negatives)
# todo maybe split into separate jobs? need to add comment how to run
[testenv:mypy-misc]
allowlist_externals = cat
commands =
pip install -e .[testing,optional]
@ -132,6 +138,10 @@ commands =
--html-report .coverage.mypy-misc \
{posargs}
# txt report is a bit more convenient to view on CI
cat .coverage.mypy-misc/index.txt
{envpython} -m mypy --install-types --non-interactive \
tests
# note: this comment doesn't seem relevant anymore, but keeping it in case the issue happens again
# > ugh ... need to reset HOME, otherwise user's site-packages are somehow leaking into mypy's path...