new python pep8 linting workflow

This commit is contained in:
2020-04-20 00:26:47 -05:00
committed by GitHub
parent 6146ee0fa2
commit 7dd42e355a

33
.github/workflows/pep8.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: PEP8 Linting
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install pipenv & sync
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv sync
- name: Lint
run: |
pip install pycodestyle
# PyCharm sets line length at 120 chars
pycodestyle --count --statistics --max-line-length=120
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pip install pytest
# pytest