mirror of
https://github.com/enpaul/vault2vault.git
synced 2024-11-27 20:39:50 +00:00
Ethan Paul
71a464cb26
Removes restriction on destination environment, allowing users to use the same version of ansible with this script as they use for everything else
90 lines
1.9 KiB
INI
90 lines
1.9 KiB
INI
[tox]
|
|
envlist = py36, py37, py38, py39, py310, static, static-tests, security
|
|
isolated_build = true
|
|
skip_missing_interpreters = true
|
|
|
|
[testenv]
|
|
description = Run the tests
|
|
require_locked_deps = true
|
|
require_poetry = true
|
|
extras =
|
|
ansible
|
|
locked_deps =
|
|
pytest
|
|
pytest-cov
|
|
toml
|
|
commands =
|
|
pytest {toxinidir}/tests/ \
|
|
--cov vault2vault \
|
|
--cov-config {toxinidir}/.coveragerc \
|
|
--cov-report term-missing
|
|
|
|
[testenv:static]
|
|
description = Static formatting and quality enforcement
|
|
basepython = python3.8
|
|
platform = linux
|
|
ignore_errors = true
|
|
locked_deps =
|
|
black
|
|
blacken-docs
|
|
mdformat
|
|
mdformat-gfm
|
|
mypy
|
|
reorder-python-imports
|
|
pre-commit
|
|
pre-commit-hooks
|
|
pylint
|
|
types-toml
|
|
commands =
|
|
pre-commit run \
|
|
--all-files
|
|
pylint {toxinidir}/vault2vault.py \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/vault2vault.py \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:static-tests]
|
|
description = Static formatting and quality enforcement for the tests
|
|
basepython = python3.8
|
|
platform = linux
|
|
ignore_errors = true
|
|
locked_deps =
|
|
pylint
|
|
pytest
|
|
mypy
|
|
types-toml
|
|
commands =
|
|
pylint {toxinidir}/tests/ \
|
|
--rcfile {toxinidir}/.pylintrc
|
|
mypy {toxinidir}/tests/ \
|
|
--ignore-missing-imports \
|
|
--no-strict-optional
|
|
|
|
[testenv:security]
|
|
description = Security checks
|
|
basepython = python3.8
|
|
platform = linux
|
|
ignore_errors = true
|
|
skip_install = true
|
|
locked_deps =
|
|
bandit
|
|
safety
|
|
poetry
|
|
commands =
|
|
bandit {toxinidir}/vault2vault.py \
|
|
--recursive \
|
|
--quiet
|
|
bandit {toxinidir}/tests/ \
|
|
--recursive \
|
|
--quiet \
|
|
--skip B101
|
|
poetry export \
|
|
--format requirements.txt \
|
|
--output {envtmpdir}/requirements.txt \
|
|
--without-hashes \
|
|
--dev
|
|
safety check \
|
|
--file {envtmpdir}/requirements.txt \
|
|
--json
|