|
@@ -1,9 +1,8 @@
|
|
[tox]
|
|
[tox]
|
|
-skip_missing_interpreters=true
|
|
|
|
|
|
+skip_missing_interpreters = true
|
|
envlist =
|
|
envlist =
|
|
- py{35,36,37},
|
|
|
|
- flake8,
|
|
|
|
- coverage-report
|
|
|
|
|
|
+ py{27,35,36,37},
|
|
|
|
+ coverage
|
|
|
|
|
|
[testenv]
|
|
[testenv]
|
|
use_develop = true
|
|
use_develop = true
|
|
@@ -14,64 +13,26 @@ deps =
|
|
setenv =
|
|
setenv =
|
|
COVERAGE_FILE = tests/.coverage.{envname}
|
|
COVERAGE_FILE = tests/.coverage.{envname}
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
+passenv = TOXENV CI CODECOV_* SYSTEM_* AGENT_* BUILD_*
|
|
commands =
|
|
commands =
|
|
- coverage run -m pytest {toxinidir}/tests {toxinidir}/flaskbb {posargs}
|
|
|
|
|
|
+ pytest {toxinidir}/tests {toxinidir}/flaskbb {posargs}
|
|
|
|
|
|
-[testenv:coverage-report]
|
|
|
|
|
|
+[testenv:coverage]
|
|
skip_install = true
|
|
skip_install = true
|
|
deps = coverage
|
|
deps = coverage
|
|
|
|
+setenv =
|
|
|
|
+ COVERAGE_FILE = tests/.coverage
|
|
commands =
|
|
commands =
|
|
- coverage combine tests
|
|
|
|
|
|
+ coverage combine
|
|
coverage report
|
|
coverage report
|
|
|
|
|
|
-[testenv:codecov]
|
|
|
|
|
|
+[testenv:coverage-ci]
|
|
skip_install = true
|
|
skip_install = true
|
|
deps = codecov
|
|
deps = codecov
|
|
|
|
+setenv =
|
|
|
|
+ COVERAGE_FILE = tests/.coverage
|
|
commands =
|
|
commands =
|
|
- coverage combine tests
|
|
|
|
- codecov
|
|
|
|
|
|
+ coverage combine
|
|
|
|
+ coverage xml
|
|
coverage report
|
|
coverage report
|
|
-
|
|
|
|
-[testenv:black]
|
|
|
|
-skip_install = true
|
|
|
|
-deps = black
|
|
|
|
-basepython=python3.7
|
|
|
|
-commands = black --check tests/ flaskbb/
|
|
|
|
-
|
|
|
|
-[testenv:flake8]
|
|
|
|
-skip_install = true
|
|
|
|
-basepython=python3.7
|
|
|
|
-commands =
|
|
|
|
- flake8 --version
|
|
|
|
- flake8 --config={toxinidir}/tox.ini {toxinidir}/flaskbb {toxinidir}/tests
|
|
|
|
-
|
|
|
|
-[flake8]
|
|
|
|
-# B = bugbear
|
|
|
|
-# E = pycodestyle errors
|
|
|
|
-# F = flake8 pyflakes
|
|
|
|
-# W = pycodestyle warnings
|
|
|
|
-# B9 = bugbear opinions
|
|
|
|
-ignore = E203, E712, E711, W503
|
|
|
|
-select = C,E,F,W,B,B9
|
|
|
|
-max-complexity = 10
|
|
|
|
-max-line-length = 88
|
|
|
|
-exclude =
|
|
|
|
- # allowed to break the rules
|
|
|
|
- flaskbb/configs/default.py,
|
|
|
|
- flaskbb/_compat.py,
|
|
|
|
- # migrations are autogenerated
|
|
|
|
- migrations,
|
|
|
|
- # stuff to not inspect at all
|
|
|
|
- node_modules,
|
|
|
|
- .git,
|
|
|
|
- .tox,
|
|
|
|
- *.pyc,
|
|
|
|
- __pycache__,
|
|
|
|
- instance,
|
|
|
|
- dist,
|
|
|
|
- build,
|
|
|
|
- docs
|
|
|
|
-
|
|
|
|
-[pytest]
|
|
|
|
-addopts = -vvl --strict --capture fd -W error::flaskbb.deprecation.FlaskBBDeprecation
|
|
|
|
-norecursedirs = node_modules
|
|
|
|
|
|
+ codecov
|