Skip to content

Commit

Permalink
Add separate tox environment for flake8 linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
fschulze committed Sep 29, 2024
1 parent 23617fe commit d6623d4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501,W503,W504
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- python-version: "3.7"
tox-envs: "py37"
continue-on-error: false
- python-version: "3.7"
tox-envs: "flake8"
continue-on-error: false
- python-version: "3.8"
tox-envs: "py38"
continue-on-error: false
Expand Down
15 changes: 10 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
envlist =
flake8
py27{,-ansible19,-ansible24,-ansible25,-ansible26,-ansible27,-ansible28,-ansible29,-ansible210},
py37{,-ansible25,-ansible26,-ansible27,-ansible28,-ansible29,-ansible210},
py38{,-ansible25,-ansible26,-ansible27,-ansible28,-ansible29,-ansible210},
Expand All @@ -22,19 +23,23 @@ deps =
ansiblecore213: ansible-core>=2.13,<2.14dev
ansiblecore214: ansible-core>=2.14,<2.15dev
ansiblecore215: ansible-core>=2.15,<2.16dev
ansiblecore216: ansible-core>=2.16,<2.17dev
ansiblecore217: ansible-core>=2.17,<2.18dev
coverage
flake8<5
mock
pytest
pytest-cov
pytest-flake8 < 1.1.0;python_version=="2.7"
pytest-flake8;python_version!="2.7"
changedir = {envdir}
commands =
{envbindir}/py.test --cov {envsitepackagesdir}/ploy_ansible/ --cov-report html:{toxinidir}/htmlcov_{envname} {posargs} {envsitepackagesdir}/ploy_ansible/


[testenv:flake8]
commands = flake8 --config {toxinidir}/.flake8 {toxinidir}
deps = flake8
skip_install = true


[pytest]
addopts = --flake8 --tb=native
flake8-ignore = E501 W503 W504
addopts = --tb=native
log_level = NOTSET

0 comments on commit d6623d4

Please sign in to comment.