-
Notifications
You must be signed in to change notification settings - Fork 115
/
tox.ini
82 lines (68 loc) · 1.67 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[tox]
# as per https://docs.djangoproject.com/en/1.11/faq/install/#what-python-version-can-i-use-with-django
envlist = d{32,42}-py{39,310,311}
;
;skip_missing_interpreters = true
;
[pytest]
;DJANGO_SETTINGS_MODULE = demo.settings
django_find_project = false
norecursedirs = demo .tox
addopts =
-v
--doctest-modules
--tb=short
--reuse-db
--cov=adminactions
--cov-report=html
--cov-config=tests/.coveragerc
--capture=no
--doctest-glob=adminactions/*.py
--echo-version django
doctest_optionflags =
python_files = tests/test_*.py tests/**/test_*.py
markers =
functional: mark a test as functional
selenium: selenium test
skip: skip test
[testenv]
passenv =
DISPLAY
CELERY_BROKER_URL
setenv =
PYTHONDONTWRITEBYTECODE=true
CRYPTOGRAPHY_DONT_BUILD_RUST=1
PYTHONPATH=./src:./tests
CELERY_ALWAYS_EAGER=1
whitelist_externals = mkdir
deps =
-rsrc/requirements/testing.pip
pypy: psycopg2cffi
d32: django==3.2.*
d42: django==4.2.*
; only for local development
dev: git+https://github.com/django/django.git
commands =
{posargs:py.test tests/ src --doctest-modules --create-db}
[testenv:lint]
envdir = {toxworkdir}/d32-py39/
skip_install = true
deps =
black
flake8
isort
pre-commit
commands =
pre-commit run --all
[testenv:package]
deps =
build
twine
setenv =
TWINE_USERNAME = {env:TWINE_TEST_USERNAME:__token__}
TWINE_PASSWORD = {env:TWINE_TEST_PASSWORD}
commands =
python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python -m build
python -m twine check dist/*
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*