mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Migrate pytest and tox to pyproject.toml
This commit is contained in:
parent
b6b26e492f
commit
0256c94720
4 changed files with 55 additions and 53 deletions
|
|
@ -1,3 +0,0 @@
|
|||
[run]
|
||||
branch = True
|
||||
source = axes
|
||||
|
|
@ -1,2 +1,57 @@
|
|||
[build-system]
|
||||
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = "tests"
|
||||
addopts = "--cov axes --cov-append --cov-branch --cov-report term-missing --cov-report=xml"
|
||||
DJANGO_SETTINGS_MODULE = "tests.settings"
|
||||
|
||||
[tool.tox]
|
||||
legacy_tox_ini = """
|
||||
[tox]
|
||||
envlist =
|
||||
py38-djqa
|
||||
py{36,37,38,39,py3}-dj{22,30,31,dev}
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
3.6: py36
|
||||
3.7: py37
|
||||
3.8: py38
|
||||
3.9: py39
|
||||
pypy3: pypy3
|
||||
|
||||
[gh-actions:env]
|
||||
DJANGO =
|
||||
2.2: dj22
|
||||
3.0: dj30
|
||||
3.1: dj31
|
||||
dev: djdev
|
||||
qa: djqa
|
||||
|
||||
# Normal test environment runs pytest which orchestrates other tools
|
||||
[testenv]
|
||||
deps =
|
||||
-r requirements-test.txt
|
||||
dj22: django>=2.2,<2.3
|
||||
dj30: django>=3.0,<3.1
|
||||
dj31: django>=3.1,<3.2
|
||||
djdev: https://github.com/django/django/archive/master.tar.gz
|
||||
usedevelop = true
|
||||
commands = pytest
|
||||
setenv =
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Django development version is allowed to fail the test matrix
|
||||
[testenv:py{36,37,38,39,py3}-dj{dev}]
|
||||
ignore_errors = true
|
||||
ignore_outcome = true
|
||||
|
||||
# QA runs type checks, linting, and code formatting checks
|
||||
[testenv:py38-djqa]
|
||||
deps = -r requirements-qa.txt
|
||||
commands =
|
||||
mypy axes
|
||||
prospector
|
||||
black -t py36 --check --diff axes
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
[pytest]
|
||||
testpaths = tests
|
||||
addopts = --cov axes --cov-config .coveragerc --cov-append --cov-report term-missing --cov-report=xml
|
||||
DJANGO_SETTINGS_MODULE = tests.settings
|
||||
46
tox.ini
46
tox.ini
|
|
@ -1,46 +0,0 @@
|
|||
[tox]
|
||||
envlist =
|
||||
py38-djqa
|
||||
py{36,37,38,39,py3}-dj{22,30,31,dev}
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
3.6: py36
|
||||
3.7: py37
|
||||
3.8: py38
|
||||
3.9: py39
|
||||
pypy3: pypy3
|
||||
|
||||
[gh-actions:env]
|
||||
DJANGO =
|
||||
2.2: dj22
|
||||
3.0: dj30
|
||||
3.1: dj31
|
||||
dev: djdev
|
||||
qa: djqa
|
||||
|
||||
# Normal test environment runs pytest which orchestrates other tools
|
||||
[testenv]
|
||||
deps =
|
||||
-r requirements-test.txt
|
||||
dj22: django>=2.2,<2.3
|
||||
dj30: django>=3.0,<3.1
|
||||
dj31: django>=3.1,<3.2
|
||||
djdev: https://github.com/django/django/archive/master.tar.gz
|
||||
usedevelop = true
|
||||
commands = pytest
|
||||
setenv =
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Django development version is allowed to fail the test matrix
|
||||
[testenv:py{36,37,38,39,py3}-dj{dev}]
|
||||
ignore_errors = true
|
||||
ignore_outcome = true
|
||||
|
||||
# QA runs type checks, linting, and code formatting checks
|
||||
[testenv:py38-djqa]
|
||||
deps = -r requirements-qa.txt
|
||||
commands =
|
||||
mypy axes
|
||||
prospector
|
||||
black -t py36 --check --diff axes
|
||||
Loading…
Reference in a new issue