replace CI tools with tox invocation

This commit is contained in:
2020-06-16 22:59:23 -05:00
parent 5994b73b2e
commit f77aebb097
5 changed files with 68 additions and 39 deletions

51
tox.ini Normal file
View File

@@ -0,0 +1,51 @@
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py37,artifacts
[testenv]
# build a wheel and test it
wheel = true
wheel_build_env = build
deps =
flake8
pytest
pytest-cov
commands =
flake8
python -m pytest
# whitelist commands we need
whitelist_externals = ln
[testenv:build]
# require setuptools when building
deps = setuptools
[testenv:artifacts]
deps =
skip_install = true
commands =
ln -sf {distdir} dist
[flake8]
max-line-length = 120
exclude = .tox/,versioneer.py,_version.py
max-complexity = 5
[pytest]
python_files = tests.py test_*.py
addopts = --cov --cov-report=term --cov-report=term-missing
[coverage:run]
branch = True
omit =
.tox/*
setup.py
tests/*
versioneer.py
incorporealcms/_version.py