47 lines
1.4 KiB
INI
47 lines
1.4 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 pathe to check the fallback logic
|
|
setenv = MY_CONFIG = nonexistent
|
|
commands =
|
|
pip install -e .[testing]
|
|
# TODO ??
|
|
# python -m pytest {posargs}
|
|
python3 -c 'import my.init; from my.config import stub as config; print(config.key)'
|
|
python3 -c 'import my.init; import my.config; import my.config.repos' # shouldn't fail at least
|
|
python3 -m pytest tests/misc.py tests/get_files.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
|
|
|
|
|
|
[testenv:demo]
|
|
# TODO wtf????
|
|
changedir = {toxworkdir}/{envname}/../..
|
|
# TODO not sure?? also reuse installed my. instead on installing in demo.py?
|
|
skip_install = true
|
|
# TODO need to keep full config as example? to dummy run CI
|
|
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
|