-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tox.ini: Call poetry in tox.ini again, as this way we can ensure to install all packages based on the lock file. Additionally, this allows to properly and selectively install extras, required e.g. by the coverage target (as to not install pyalpm for all targets). .gitlab-ci.yml: Install python-poetry to test environment. pyproject.toml: Add setuptools to build requirements because of bug in pip: pypa/pip#6100
- Loading branch information
Showing
3 changed files
with
23 additions
and
19 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
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 |
---|---|---|
@@ -1,35 +1,37 @@ | ||
[tox] | ||
isolated_build = true | ||
isolated_build = True | ||
envlist = linter,coverage | ||
skip_missing_interpreters = True | ||
requires = | ||
tox-poetry-dev-dependencies | ||
|
||
[testenv] | ||
base_python = py310 | ||
poetry_add_dev_dependencies = True | ||
whitelist_externals = poetry | ||
|
||
[testenv:coverage] | ||
commands = | ||
coverage run | ||
coverage xml -o {toxworkdir}/coverage.xml -i | ||
coverage html -d {toxworkdir}/htmlcov -i | ||
coverage report --fail-under=100.0 | ||
poetry install -E vercmp | ||
poetry run coverage run | ||
poetry run coverage xml -o {toxworkdir}/coverage.xml -i | ||
poetry run coverage html -d {toxworkdir}/htmlcov -i | ||
poetry run coverage report --fail-under=100.0 | ||
|
||
[testenv:linter] | ||
commands = | ||
isort --check . | ||
black --check . | ||
flake8 | ||
mypy --install-types --non-interactive -p repod -p tests | ||
poetry install | ||
poetry run isort --check . | ||
poetry run black --check . | ||
poetry run flake8 | ||
poetry run mypy --install-types --non-interactive -p repod -p tests | ||
|
||
[testenv:docs] | ||
commands = | ||
python -c 'from repod.models.package import export_schemas; export_schemas(output="docs/repositories/schema/")' | ||
python -c 'from repod.files.buildinfo import export_schemas; export_schemas(output="docs/packages/schema/")' | ||
python -c 'from repod.files.mtree import export_schemas; export_schemas(output="docs/packages/schema/")' | ||
sphinx-build -M html docs/ docs/_build/ | ||
poetry install | ||
poetry run python -c 'from repod.models.package import export_schemas; export_schemas(output="docs/repositories/schema/")' | ||
poetry run python -c 'from repod.files.buildinfo import export_schemas; export_schemas(output="docs/packages/schema/")' | ||
poetry run python -c 'from repod.files.mtree import export_schemas; export_schemas(output="docs/packages/schema/")' | ||
poetry run sphinx-build -M html docs/ docs/_build/ | ||
|
||
[testenv:integration] | ||
commands = | ||
pytest -vv tests/ -m "integration" | ||
poetry install | ||
poetry run pytest -m "integration" |