Add flake8 github action with review dog

Review dog is an incredible project that makes linting and formatting
review a breeze by commenting inline what is wrong in a pull request.
This makes the review process easier for the maintainer and also
provides a clearer feedback to the contributor
This commit is contained in:
Alan Barzilay 2021-09-03 20:49:55 -03:00
parent 682a0e2fcf
commit aadc9c8de1
2 changed files with 21 additions and 8 deletions

20
.github/workflows/flake8.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: flake8
on: pull_request
jobs:
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: flake8 Lint
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review

View File

@ -6,11 +6,4 @@ setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/pipreqs
commands = python setup.py test
deps =
-r{toxinidir}/requirements.txt
[testenv:flake8]
basepython = python3.9
commands = flake8 pipreqs
deps =
-r{toxinidir}/requirements.txt
flake8
-r{toxinidir}/requirements.txt