Skip to content

Commit

Permalink
Add flake8 github action with review dog
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alan-barzilay committed Sep 4, 2021
1 parent 682a0e2 commit aadc9c8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 1 addition & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit aadc9c8

Please sign in to comment.