forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
60 lines (52 loc) · 1.31 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]
envlist = py39-django31
skipsdist = True
[testenv]
passenv =
CODECOV_* TOXENV CI
DATABASE_URL SECRET_KEY QUERIES_RESULTS_PATH
deps =
-rrequirements.txt
-rrequirements_dev.txt
commands =
python manage.py collectstatic --noinput --verbosity=0
pytest --cov --cov-report= --django-db-bench={env:QUERIES_RESULTS_PATH}
codecov
[testenv:black]
basepython = python3.9
commands =
black --check .
[testenv:flake8]
basepython = python3.9
deps =
flake8>=3.7.0
commands =
flake8 saleor
[testenv:pydocstyle]
basepython = python3.9
whitelist_externals = sh
commands =
sh -c 'find saleor -name "*.py" -type f ! -path "*tests*" | xargs pydocstyle -v'
[testenv:isort]
basepython = python3.9
commands =
isort --check-only
[testenv:mypy]
basepython = python3.9
whitelist_externals = sh
deps =
-rrequirements_dev.txt
commands =
sh -c 'find saleor -name "*.py" -type f ! -path "*tests*" | xargs mypy'
[testenv:check_gql_schema]
basepython = python3.9
whitelist_externals = sh
commands =
sh -c './manage.py get_graphql_schema | diff saleor/graphql/schema.graphql -'
[testenv:check_migrations]
basepython = python3.9
whitelist_externals = psql
commands =
psql -c "CREATE DATABASE saleor;" -U postgres
python manage.py migrate
python manage.py makemigrations --dry-run --check