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 1797bf2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 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 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 1797bf2

Please sign in to comment.