replace CI tools with tox invocation

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

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ __pycache__/
build/
develop-eggs/
dist/
dist
downloads/
eggs/
.eggs/

View File

@ -1,7 +1,6 @@
-r requirements.in
flake8 # python code quality stuff
pip-tools # pip-compile
pytest # unit tests
pytest-cov # coverage in unit tests
tox # CI stuff
tox-wheel # build wheels in tox
versioneer # automatic version numbering

View File

@ -4,33 +4,31 @@
#
# pip-compile --output-file=requirements/requirements-dev.txt requirements/requirements-dev.in
#
attrs==19.3.0 # via pytest
appdirs==1.4.4 # via virtualenv
click==7.1.2 # via flask, pip-tools
coverage==5.1 # via pytest-cov
flake8==3.8.2 # via -r requirements/requirements-dev.in
distlib==0.3.0 # via virtualenv
filelock==3.0.12 # via tox, virtualenv
flask==1.1.2 # via -r requirements/requirements.in
importlib-metadata==1.6.0 # via flake8, markdown, pluggy, pytest
importlib-metadata==1.6.0 # via markdown, pluggy, tox, virtualenv
itsdangerous==1.1.0 # via flask
jinja2==2.11.2 # via flask
markdown==3.2.2 # via -r requirements/requirements.in
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via flake8
more-itertools==8.3.0 # via pytest
packaging==20.4 # via pytest
pip-tools==5.2.0 # via -r requirements/requirements-dev.in
pluggy==0.13.1 # via pytest
py==1.8.1 # via pytest
pycodestyle==2.6.0 # via flake8
pyflakes==2.2.0 # via flake8
packaging==20.4 # via tox
pip-tools==5.2.1 # via -r requirements/requirements-dev.in
pluggy==0.13.1 # via tox
py==1.8.1 # via tox
pyparsing==2.4.7 # via packaging
pytest-cov==2.9.0 # via -r requirements/requirements-dev.in
pytest==5.4.2 # via -r requirements/requirements-dev.in, pytest-cov
pytz==2020.1 # via tzlocal
six==1.15.0 # via packaging, pip-tools
six==1.15.0 # via packaging, pip-tools, tox, virtualenv
toml==0.10.1 # via tox
tox-wheel==0.4.2 # via -r requirements/requirements-dev.in
tox==3.15.2 # via -r requirements/requirements-dev.in, tox-wheel
tzlocal==2.1 # via -r requirements/requirements.in
versioneer==0.18 # via -r requirements/requirements-dev.in
wcwidth==0.1.9 # via pytest
virtualenv==20.0.23 # via tox
werkzeug==1.0.1 # via flask
wheel==0.34.2 # via tox-wheel
zipp==3.1.0 # via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:

View File

@ -1,23 +1,3 @@
[coverage:run]
branch = True
omit =
.venv/*
incorporealcms/_version.py
setup.py
tests/*
versioneer.py
source =
incorporealcms
[flake8]
exclude = .git,.venv,__pycache__,versioneer.py,incorporealcms/_version.py
max-line-length = 120
[tool:pytest]
addopts = --cov=. --cov-report=term --cov-report=term-missing
log_cli = 1
log_cli_level = DEBUG
[versioneer]
VCS = git
style = pep440-post

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