diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52909fa..6578067 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ stages: before_script: - printf "[multilib]\nInclude = /etc/pacman.d/mirrorlist\n" >> /etc/pacman.conf - pacman --noconfirm -Fyy - - pacman --noconfirm -Syyu --needed base-devel git python-tox + - pacman --noconfirm -Syyu --needed base-devel git python-poetry python-tox linter: extends: .test diff --git a/pyproject.toml b/pyproject.toml index 9185c8d..0f0b83f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,5 +113,7 @@ disallow_incomplete_defs = true show_error_codes = true [build-system] -requires = ["poetry-core>=1.0.0"] +# requiring setuptools to get around flaky pip behavior (we actually don't need it) +# https://github.com/pypa/pip/issues/6100 +requires = ["setuptools", "poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/tox.ini b/tox.ini index 7f4170a..3f77604 100644 --- a/tox.ini +++ b/tox.ini @@ -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"