-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
107 lines (86 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[tox]
envlist = build, style, doc, test
[testenv]
changedir = {envtmpdir}
passenv = HOME, WORKSPACE, https_proxy, http_proxy, no_proxy
[testenv:run]
deps =
ipdb
setenv =
SURREALDB_PASSWORD=root
commands =
surrealdb_migrations -vvv {posargs}
[testenv:run-db]
allowlist_externals =
docker
commands =
docker run \
--rm \
--pull always \
--name surrealdb \
-p 8000:8000 \
surrealdb/surrealdb:latest \
start --log trace --user root --pass root memory
[testenv:build]
skip_install = True
deps =
build
wheel
commands =
{envpython} -m build {toxinidir}
[testenv:build-container]
skip_install = True
allowlist_externals =
docker
commands =
docker build --file {toxinidir}/deployment/docker/Dockerfile {toxinidir} {posargs:--tag surrealdb_migrations:latest}
[testenv:style]
skip_install = True
deps =
flake8
pep8-naming
commands =
flake8 {toxinidir}
[testenv:doc]
deps =
-rdoc/requirements.txt
allowlist_externals =
dot
commands =
sphinx-build -W -b html -d doctrees {toxinidir}/doc/ html
{envpython} -c "print('>> You may now run:\nwebdev {envtmpdir}/html/')"
[testenv:test]
deps =
-rtest/requirements.txt
allowlist_externals =
rm
commands =
# Clean testing cache
rm -rf {toxinidir}/test/__pycache__
# Run test suite
py.test -s \
--junitxml=tests.xml \
--cov=surrealdb_migrations \
--cov-report xml \
--cov-report html \
--cov-report term \
{posargs} \
{toxinidir}/test
[testenv:publish]
skip_install = True
deps =
build
wheel
twine
allowlist_externals =
ls
commands =
{envpython} -m build {toxinidir}
ls -lh {toxinidir}/dist/
{envpython} -c "print((\
'Packages ready. '\
'Execute the following command to publish:\n'\
' twine upload --repository pypi --skip-existing dist/*'\
))"
[flake8]
exclude = .git,.tox,.cache,__pycache__,build,*.egg-info,.local