From 4f3b916b9f30bcd90416f794aa43823e45533f8a Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 16 Nov 2021 22:28:54 +0100 Subject: [PATCH] Add pep8 check to tox and GitHub actions --- .github/workflows/run-tox.yml | 12 ++++++++++++ tox.ini | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index 8f78202..e054a07 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -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" diff --git a/tox.ini b/tox.ini index 141f567..f45e701 100644 --- a/tox.ini +++ b/tox.ini @@ -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