-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
tox
to build test environments and OpenAstronomy
reusable wor…
…kflow
- Loading branch information
1 parent
c32158f
commit e38b150
Showing
2 changed files
with
78 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[tox] | ||
env_list = | ||
check-{style} | ||
test{,-mindeps}{,-warnings,-cov}-xdist | ||
build-{docs,dist} | ||
|
||
[testenv:check-style] | ||
description = check code style | ||
skip_install = true | ||
deps = | ||
flake8 | ||
commands = | ||
flake8 . {posargs} | ||
|
||
[testenv] | ||
description = | ||
run tests | ||
mindeps: with the minimum supported versions of key dependencies | ||
warnings: treating warnings as errors | ||
cov: with coverage | ||
xdist: using parallel processing | ||
extras = | ||
test | ||
deps = | ||
xdist: pytest-xdist | ||
mindeps: minimum_dependencies | ||
devdeps: -rrequirements-dev.txt | ||
commands_pre = | ||
mindeps: minimum_dependencies asv --filename requirements-min.txt | ||
mindeps: pip install -r requirements-min.txt | ||
pip freeze | ||
commands = | ||
pytest -v --timeout 300 --durations 100 \ | ||
cov: --cov . --cov-report xml \ | ||
warnings: -W error \ | ||
xdist: -n auto \ | ||
{posargs} | ||
|
||
[testenv:build-docs] | ||
description = invoke sphinx-build to build the HTML docs | ||
extras = docs | ||
commands = | ||
sphinx-build -W docs/source html | ||
|
||
[testenv:build-dist] | ||
description = package source and build wheel | ||
skip_install = true | ||
deps = | ||
build | ||
commands = | ||
python -m build . |