mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
CI: run entry point tests without deps, run lint without package build steps
This commit is contained in:
parent
9949e34e96
commit
8fe034ef7c
11
tox.ini
11
tox.ini
@ -6,24 +6,27 @@ envlist =
|
|||||||
pycodestyle,
|
pycodestyle,
|
||||||
run-entrypoint,
|
run-entrypoint,
|
||||||
run-module,
|
run-module,
|
||||||
skipsdist = false
|
|
||||||
; Can't set skipsdist and use_develop in tox v4 to true due to https://github.com/tox-dev/tox/issues/2730
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
use_develop = true
|
package = editable
|
||||||
commands = pytest --cov=gunicorn {posargs}
|
commands = pytest --cov=gunicorn {posargs}
|
||||||
deps =
|
deps =
|
||||||
-rrequirements_test.txt
|
-rrequirements_test.txt
|
||||||
|
|
||||||
[testenv:run-entrypoint]
|
[testenv:run-entrypoint]
|
||||||
|
package = wheel
|
||||||
|
deps =
|
||||||
# entry point: console script (provided by setuptools from pyproject.toml)
|
# entry point: console script (provided by setuptools from pyproject.toml)
|
||||||
commands = python -c 'import subprocess; cmd_out = subprocess.check_output(["gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
|
commands = python -c 'import subprocess; cmd_out = subprocess.check_output(["gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
|
||||||
|
|
||||||
[testenv:run-module]
|
[testenv:run-module]
|
||||||
|
package = wheel
|
||||||
|
deps =
|
||||||
# runpy (provided by module.__main__)
|
# runpy (provided by module.__main__)
|
||||||
commands = python -c 'import sys,subprocess; cmd_out = subprocess.check_output([sys.executable, "-m", "gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
|
commands = python -c 'import sys,subprocess; cmd_out = subprocess.check_output([sys.executable, "-m", "gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")'
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
|
no_package = true
|
||||||
commands =
|
commands =
|
||||||
pylint -j0 \
|
pylint -j0 \
|
||||||
--max-line-length=120 \
|
--max-line-length=120 \
|
||||||
@ -44,6 +47,7 @@ deps =
|
|||||||
pylint==2.17.4
|
pylint==2.17.4
|
||||||
|
|
||||||
[testenv:docs-lint]
|
[testenv:docs-lint]
|
||||||
|
no_package = true
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
rst-lint
|
rst-lint
|
||||||
bash
|
bash
|
||||||
@ -56,6 +60,7 @@ commands =
|
|||||||
bash -c "(set -o pipefail; rst-lint --encoding utf-8 docs/source/*.rst | grep -v 'Unknown interpreted text role\|Unknown directive type'); test $? == 1"
|
bash -c "(set -o pipefail; rst-lint --encoding utf-8 docs/source/*.rst | grep -v 'Unknown interpreted text role\|Unknown directive type'); test $? == 1"
|
||||||
|
|
||||||
[testenv:pycodestyle]
|
[testenv:pycodestyle]
|
||||||
|
no_package = true
|
||||||
commands =
|
commands =
|
||||||
pycodestyle gunicorn
|
pycodestyle gunicorn
|
||||||
deps =
|
deps =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user