mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
* Add ansible-lint to tox linters (#258) * Add ansible-lint to tox linters * Bump black * Black formatting * fix linting (cherry picked from commitf54297c2ac) * Update tests for newer version of openshift (#254) * Update tests for newer version of openshift More recent versions of ocp no longer automatically create tokens for service accounts. This updates the tests to manually create the tokens. * Update nginx template version The old image was EOL and the deployment was failing to deploy. * Fix nginx version for all tasks * Add missing var (cherry picked from commita3c3a69bbf) --------- Co-authored-by: Mike Graves <mgraves@redhat.com>
40 lines
760 B
INI
40 lines
760 B
INI
[tox]
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
install_command = pip install {opts} {packages}
|
|
|
|
[testenv:black]
|
|
deps =
|
|
black >= 25.0, < 26.0
|
|
|
|
commands =
|
|
black {toxinidir}/plugins {toxinidir}/tests
|
|
|
|
[testenv:ansible-lint]
|
|
deps =
|
|
ansible-lint==6.21.0
|
|
changedir = {toxinidir}
|
|
commands =
|
|
ansible-lint
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
flake8
|
|
{[testenv:black]deps}
|
|
{[testenv:ansible-lint]deps}
|
|
|
|
commands =
|
|
black -v --check --diff {toxinidir}/plugins {toxinidir}/tests
|
|
flake8 {toxinidir}
|
|
ansible-lint
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
exclude = .git,.tox,tests/output
|
|
ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503
|
|
max-line-length = 160
|
|
builtins = _
|