-
Notifications
You must be signed in to change notification settings - Fork 16
/
tox.ini
64 lines (57 loc) · 1.87 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
[tox]
envlist = py36, py37, py38, black-check
skip_missing_interpreters = true
isolated_build = true
[testenv]
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = TOXENV CI CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
deps =
pytest
pytest-cov >= 2.0.0
coverage[toml] >=5.0.2
commands = pytest {toxinidir} \
--cov="grid_strategy" \
--cov="tests" \
{posargs}
[testenv:coverage]
description = combine coverage data and create reports
deps = coverage[toml] >= 5.0.2
skip_install = True
changedir = {toxworkdir}
setenv = COVERAGE_FILE=.coverage
commands = coverage erase
coverage combine
coverage report
coverage xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
commands = codecov --file {toxworkdir}/coverage.xml
[testenv:black-check]
description = test if black works
deps =
pytest-black
commands = pytest --black
[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python3.6
deps = -r docs/requirements-docs.txt
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs \
"{toxworkdir}/docs_out" {posargs:-W --color}
sphinx-build -d "{toxworkdir}/docs_doctree" docs \
"{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}
[testenv:build]
description = Build the documentation
deps = twine
pep517
readme_renderer[md] >= 24.0
commands = python -m pep517.build --source --binary {toxinidir} \
--out-dir {toxinidir}/dists
twine check {toxinidir}/dists/*
[testenv:release]
description = Make a pypi release
basepython = python3.7
passenv = *
deps = twine
commands = python scripts/release.py {posargs}