forked from karlicoss/promnesia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
71 lines (56 loc) · 2.11 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[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
# todo ugh this is all so confusing... need to simplify
[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 .[HPI,org]
# used in some tests
hpi module install my.google.takeout.parser
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 --install-types --non-interactive \
-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
hpi module install my.google.takeout.parser
# todo hmm. replace to use -p?
python -m mypy --install-types --non-interactive \
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}