From cd375aedeb2fd6e120e4dbef6c7471ea56deaa57 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 4 Dec 2020 16:52:27 +0000 Subject: [PATCH] Validate project metadata Adds a step that builds and tests both deliverables using twine. Change-Id: Ib1d867df19d56bb01dcb2fed9e785d04286764c4 --- .gitignore | 1 + tox.ini | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 383d24e..62e3a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.egg-info *.pyc *.retry +.eggs .idea .mypy_cache .test diff --git a/tox.ini b/tox.ini index c92d3c9..53741c4 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,9 @@ passenv = OS_STDERR_CAPTURE OS_STDOUT_CAPTURE usedevelop = True -whitelist_externals = bash +whitelist_externals = + bash + rm deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -34,9 +36,14 @@ install_command = pip install {opts} {packages} deps = flake8 mypy<0.790 + twine>=3.3.0 commands = flake8 {posargs} mypy --ignore-missing-imports zuulclient + # metadata validation + rm -rfv {toxinidir}/dist/ + python setup.py sdist bdist_wheel + twine check --strict {toxinidir}/dist/* [testenv:cover] setenv =