Skip to content

Commit 12c58ef

Browse files
authored
Merge pull request #2 from phryq/tests
add linting to github workflow
2 parents 616301e + d6c93c3 commit 12c58ef

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install pytest
22+
pip install pytest flake8
23+
- name: Lint with flake8
24+
run: |
25+
# Stop the build if there are Python syntax errors or undefined names
26+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27+
# Treat all errors as warnings and set complexity and line length limits
28+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
2329
- name: Run tests
2430
run: |
2531
pytest

0 commit comments

Comments
 (0)