HPI/tox.ini
2020-09-29 19:44:45 +02:00

43 lines
1.3 KiB
INI

[tox]
minversion = 3.5
envlist = py3,mypy # pylint
# TODO ugh. unclear how to reuse setup.cfg deps in tox
[testenv]
passenv = CI CI_*
# deliberately set to nonexistent path to check the fallback logic
setenv = MY_CONFIG = nonexistent
commands =
pip install -e .[testing]
# python -m pytest {posargs}
# todo these are probably not necessary anymore?
python3 -c 'from my.config import stub as config; print(config.key)'
python3 -c 'import my.config; import my.config.repos' # shouldn't fail at least
python3 -m pytest tests/misc.py tests/get_files.py tests/config.py::test_set_repo tests/config.py::test_environment_variable tests/demo.py
# TODO add; once I figure out porg depdencency?? tests/config.py
# TODO run demo.py? just make sure with_my is a bit cleverer?
# TODO e.g. under CI, rely on installing
hpi modules
[testenv:demo]
commands = ./demo.py
[testenv:mypy]
skip_install = true
commands =
pip install -e .[testing] .[optional]
./lint
# TODO fix it
# [testenv:pylint]
# # TODO wtf????
# changedir = {toxworkdir}/{envname}/../..
# skip_install = true
# commands =
# pip install -e .[testing]
# for now ignore import errors until I figure out how to import everything for CI checking..
# TODO FIXME ugh. fix later, after properly switched to my.config
# python -m pylint -E -d import-error my