[tox] minversion = 3.5 # relies on the correct version of Python installed envlist = tests,mypy-core,mypy-misc # NOTE: we don't run end2end by default since it requires elaborate setup [testenv] passenv = CI CI_* CIRCLE* MY_CONFIG # by default we don't run browser tests to avoid confusing people when they run locally # but we want them on CI, so we allow to pass through the variable when we do want to run them WITH_BROWSER_TESTS [testenv:tests] commands = pip install -e .[testing] # run this first before we install any extra dependenceies python -m pytest tests/imports.py::test_imports_lazy pip install -e .[all] pip install -e .[org] python -m pytest tests {posargs} [testenv:end2end] setenv = WITH_BROWSER_TESTS=true commands = pip install -e .[testing] hpi python -m pytest tests/end2end_test.py {posargs} [testenv:mypy-core] commands = pip install -e .[linting] python -m mypy -p promnesia --exclude 'sources/*' \ # txt report is a bit more convenient to view on CI --txt-report .coverage.mypy-core \ --html-report .coverage.mypy-core \ {posargs} [testenv:mypy-misc] commands = pip install -e .[linting] pip install -e .[HPI,org] # todo install from HPI[all] or something? hpi module install my.github.ghexport hpi module install my.hypothesis hpi module install my.instapaper hpi module install my.pocket hpi module install my.reddit hpi module install my.fbmessenger # todo hmm. replace to use -p? python -m mypy src tests --exclude 'testdata/*' \ # txt report is a bit more convenient to view on CI --txt-report .coverage.mypy-misc \ --html-report .coverage.mypy-misc \ {posargs}