From 191ac45dc3aa6bc922dc00fc77e6a68ded196b11 Mon Sep 17 00:00:00 2001 From: Micah Sandusky Date: Thu, 22 Aug 2024 12:37:51 -0600 Subject: [PATCH] add a flake8 job --- .github/workflows/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16de730..f964338 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,26 @@ on: workflow_dispatch: jobs: + flake8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install flake8 + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # use flake8 to check formatting, based on example here https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html + flake8 . --count --select=C,E,F,W,B,B950 --max-complexity=10 --max-line-length=88 --statistics --extend-ignore=E203 build: runs-on: ubuntu-latest strategy: