Add pep8 check to tox and GitHub actions

This commit is contained in:
Sebastian Lohff 2021-11-16 22:28:54 +01:00
parent 5dcf364e0f
commit 4f3b916b9f
2 changed files with 23 additions and 1 deletions

View File

@ -23,3 +23,15 @@ jobs:
run: pip install tox
- name: Run Tox
run: tox -e py
pep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Tox
run: pip install tox
- name: Run Tox pep8
run: "tox -e pep8"

12
tox.ini
View File

@ -1,9 +1,19 @@
[tox]
envlist = py27,py36,py37,py38,py39
envlist = py27,py36,py37,py38,py39,pep8
[testenv]
deps =
pathlib2; python_version<"3"
pytest
requests
flake8
commands = pytest -v --tb=short {posargs}
[testenv:pep8]
commands = flake8 servefile/ {posargs}
[flake8]
show-source = True
max-line-length = 120
ignore = E123,E125,E241,E402,E741,W503,W504,H301
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build