Skip to content

Commit

Permalink
[chore]Add flake8 worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryamanz29 committed Apr 8, 2021
1 parent ef41fb2 commit 8fc6a3c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
ignore = E226,E302,E41,F401,W503,F405,W503,F841,F403,E402,F821,W291
max-line-length = 160

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 Check

on: [push, pull_request]

jobs:
lint:
name: Linting with Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Installing Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==3.8.4
- name: Running QA-CHECKS
run: ./flake8-check
13 changes: 13 additions & 0 deletions flake8-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

flake8-check() {
flake8 && echo "Flake8 Check ✅" ||{
>&2 echo "Flake8 Check ❌"
echo "Suggestion: Run - flake8 ."
echo ""
FAILURE=1
}
}

flake8-check
exit $FAILURE

0 comments on commit 8fc6a3c

Please sign in to comment.