forked from geoalchemy/geoalchemy2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
86 lines (80 loc) · 1.97 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
82
83
84
85
86
[tox]
envlist = py{37,38,39,310}-sqla{14,latest}, pypy3-sqla{14,latest}, lint, coverage, docs
requires=
setuptools>42
[gh-actions]
python =
3.7: py37-sqla{14, latest}
3.8: py38-sqla{14, latest}, lint
3.9: py39-sqla{14, latest}, docs
3.10: py310-sqla{14, latest}
pypy-3.8: pypy3-sqla{14, latest}
[testenv]
passenv=
PROJ_LIB
PYTEST_POSTGRESQL_DB_URL
PYTEST_MYSQL_DB_URL
PYTEST_SPATIALITE3_DB_URL
PYTEST_SPATIALITE4_DB_URL
SPATIALITE_LIBRARY_PATH
setenv=
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
EXPECTED_COV = 90
pypy3: EXPECTED_COV = 85
deps=
alembic
mysql
sqla14: SQLAlchemy==1.4.*
sqlalatest: SQLAlchemy
!pypy3: psycopg2
pypy3: psycopg2cffi
!pypy3: Shapely>=1.3.0
pypy3: Shapely>=1.3.0, !=1.7.0
-rrequirements.txt
commands=
pip freeze --all
pytest -v \
--basetemp={envtmpdir} \
--cov=geoalchemy2 \
--cov-branch \
--cov-report term-missing \
--cov-report html:reports/coverage-{envname} \
--cov-report xml:reports/coverage-{envname}.xml \
--cov-fail-under={env:EXPECTED_COV} \
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
{posargs}
[testenv:coverage]
skip_install = true
deps = coverage
allowlist_externals = /bin/bash
commands =
/bin/bash -c 'coverage combine .coverage-py*'
coverage xml
coverage report -m
[testenv:lint]
basepython = python3.7
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:format]
basepython = python3.7
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -w geoalchemy2 tests README.rst CHANGES.txt doc
pre-commit run --all-files
[testenv:docs]
basepython = python3.9
changedir = doc
allowlist_externals = make
deps =
-rrequirements-doc.txt
commands =
make clean
make html SPHINXOPTS=-W