-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
53 lines (48 loc) · 1.38 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[tox]
envlist =
ruff
py3{7,8,9,10,11}
pypy3{8,9,10}
package
clean
[testenv]
description = Unit tests
deps =
cli-test-helpers
coverage[colors]
pytest
responses
commands =
coverage run --source kustomize -m pytest {posargs}
coverage xml
coverage report
[testenv:clean]
description = Clean up bytecode and build artifacts
skip_install = true
deps = pyclean
commands = pyclean {posargs:. --debris cache coverage package pytest ruff --erase tests/unittests-report.xml --yes}
[testenv:ensure_version_matches]
description = Verify package version is same as Git tag
deps =
commands = python -c 'import os; from importlib.metadata import version; pkg, tag = os.environ["PKG_NAME"], os.environ["GIT_TAG"]; ver = version(pkg); error = f"`{ver}` != `{tag}`"; abort = f"Package version does not match the Git tag ({error}). ABORTING."; raise SystemExit(0 if ver and tag and ver == tag else abort)'
setenv =
PKG_NAME=kustomize-wrapper
GIT_TAG={posargs}
[testenv:package]
description = Build package and check metadata (or upload package)
skip_install = true
deps =
build
twine
commands =
python -m build
twine {posargs:check --strict} dist/*
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
[testenv:ruff]
description = Lightening-fast linting for Python
skip_install = true
deps = ruff
commands = ruff {posargs:. --show-source}