@@ -47,7 +47,6 @@ setenv =
47
47
ANSIBLE_STDOUT_CALLBACK ={env:ANSIBLE_STDOUT_CALLBACK:debug}
48
48
ANSIBLE_VERBOSITY ={env:ANSIBLE_VERBOSITY:0}
49
49
PIP_DISABLE_PIP_VERSION_CHECK =1
50
- PIP_USE_FEATURE =2020-resolver
51
50
PY_COLORS ={env:PY_COLORS:1}
52
51
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
53
52
PYTHONWARNINGS =ignore:DEPRECATION::pip._internal.cli.base_command
@@ -67,11 +66,11 @@ passenv =
67
66
TWINE_*
68
67
allowlist_externals =
69
68
ansible-inventory
70
- bash
71
- twine
72
- pytest
73
69
pre-commit
70
+ pytest
74
71
rm
72
+ sh
73
+ twine
75
74
76
75
[testenv:linters]
77
76
description = Performs linting, style checks, metadata-validation, packaging
@@ -86,20 +85,22 @@ description =
86
85
Validate that we can install the wheel w/ or w/o extras on Ubuntu, Debian,
87
86
Fedora, RHEL 8 and CentOS 7 by using containers.
88
87
deps =
89
- collective.checkdocs >= 0.2
90
- pep517>=0.5.0
91
- twine >= 2.0.0
92
- # our distros molecule tests are using docker
93
- extras =
94
- docker
88
+ build >= 0.5.0
89
+ twine >= 3.4.1
95
90
commands =
96
- bash -c " rm -rf {toxinidir}/dist/ && mkdir -p {toxinidir}/dist/"
97
- python -m pep517.build \
98
- --source \
99
- --binary \
100
- --out-dir {toxinidir}/dist/ {toxinidir}
101
- twine check dist/*
102
- ; pytest --capture=tee-sys --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} --molecule-unavailable-driver=driver_error tests/roles/ensure-ansible
91
+ # build wheel and sdist using PEP-517
92
+ {envpython} -c ' import os.path, shutil, sys; \
93
+ dist_dir = os.path.join("{toxinidir}", "dist"); \
94
+ os.path.isdir(dist_dir) or sys.exit(0); \
95
+ print("Removing \{ !s\} contents...".format(dist_dir), file=sys.stderr); \
96
+ shutil.rmtree(dist_dir)'
97
+ {envpython} -m build \
98
+ --outdir {toxinidir}/dist/ \
99
+ {toxinidir}
100
+ # Validate metadata using twine
101
+ twine check {toxinidir}/dist/*
102
+ # Install the wheel
103
+ sh -c " python3 -m pip install {toxinidir}/dist/*.whl"
103
104
104
105
[testenv:devel]
105
106
description = Unit testing using master branches of molecule and ansible
0 commit comments