-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
69 lines (63 loc) · 2.06 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
[tox]
envlist = py{39,310}-{base,stable},py39-{lowest,i18n},project,docs,i18n
[testenv]
setenv =
PIP_EXTRA_INDEX_URL=https://package-index.level12.net
# Ignore all "not installed in testenv" warnings.
allowlist_externals = *
skip_install = true
# Force recreation of virtualenvs for each run. When testing in CI, this won't matter b/c the
# virtualenvs won't exist in the container. When testing locally, if you've ran tox previously
# then the libraries in the tox virtualenv won't get updated on pip-install. That means CI will
# test different library versions than you are testing locally. Recreating virtualenvs should
# prevent most of that mismatch.
recreate=True
commands =
pip --version
lowest: pip install flask<2 sqlalchemy<2 markupsafe~=2.0.0
stable: pip install --progress-bar off -r ./stable-requirements.txt
pip install --progress-bar off .[tests]
i18n: pip install --progress-bar off .[i18n]
# Output installed versions to compare with previous test runs in case a dependency's change
# breaks things for our build.
pip freeze
py.test \
# feed a blank file so that a user's default pytest.ini doesn't get used
-c .circleci/pytest.ini \
-ra \
--tb native \
--strict-markers \
--cov keg keg_apps \
--cov-config .coveragerc \
--cov-report xml \
--no-cov-on-fail \
--junit-xml={toxinidir}/.circleci/test-reports/{envname}.pytests.xml \
keg {posargs}
[testenv:project]
basepython = python3.9
skip_install = true
usedevelop = false
deps =
flake8
twine
commands =
# check-manifest --ignore tox.ini,tests*
python setup.py sdist
twine check dist/*
flake8 keg keg_apps
[testenv:i18n]
skip_install = true
commands =
pip install -e .[i18n]
python keg_apps/cli.py verify-translations
[flake8]
exclude = .tox,*egg,build,.git,dist,docs
max-line-length = 100
ignore = E265,E123,E133,E226,E241,E242
[testenv:docs]
recreate = false
skip_install = false
usedevelop = true
commands =
pip install -r docs/requirements.txt
make -C docs/ html