Skip to content

Commit

Permalink
added flake8 test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonzorn committed Jan 26, 2024
1 parent 05f0bb5 commit 78d7823
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python application

on:
push:
branches: [ "master" ]
branches: [ "master", "develop" ]
pull_request:
branches: [ "master" ]
branches: [ "master", "develop" ]

permissions:
contents: read
Expand All @@ -26,11 +26,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- 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
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements/test.txt
flake8 . --config=.flake8
6 changes: 6 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
flake8>=6.1.0
flake8-commas>=2.1.0
flake8-comments>=0.1.2
flake8-quotes>=3.3.2
flake8-return>=1.2.0
flake8-use-pathlib>=0.3.0

0 comments on commit 78d7823

Please sign in to comment.