-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
60 lines (56 loc) · 1.24 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
54
55
56
57
58
59
60
[tox]
isolated_build = true
skip_missing_interpreters = True
env_list =
py313
py312
py311
[testenv]
deps = poetry
allowlist_externals =
/bin/rm
git
/bin/bash
passenv = VIRTUALENV_DISCOVERY
commands =
poetry install
poetry run flake8 -v . --count --show-source --statistics
poetry run pytest -v {posargs}
/bin/rm -rf build/ dist/
[testenv:deps]
deps = poetry
allowlist_externals =
/bin/rm
git
/bin/bash
commands =
poetry update
poetry lock
git add poetry.lock
git commit -m 'Update project dependencies'
git push
[testenv:test-release]
deps = poetry
passenv = POETRY_PYPI_TOKEN_TEST_PYPI
commands =
{[testenv]commands}
poetry run bumpversion --no-tag --no-commit --allow-dirty dev
poetry publish --build --repository test-pypi
[testenv:release]
deps = poetry
allowlist_externals =
/bin/rm
git
/bin/bash
passenv = POETRY_PYPI_TOKEN_PYPI
commands =
poetry install
poetry run flake8 -v . --count --show-source --statistics
poetry run pytest -v
/bin/bash -c '[[ $(git branch --show-current) == "main" ]] || exit 1'
poetry run bumpversion --verbose {posargs}
poetry build
git push --tags
git push
poetry publish
/bin/rm -rf build/ dist/