generated from Diapolo10/python-poetry-template
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (25 loc) · 838 Bytes
/
flake8.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This workflow runs the Flake8 linter on git push
name: Flake8
on: [ push ]
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
uses: Gr1N/setup-poetry@v9
- name: Install library and dependencies
run: |
poetry run pip install --upgrade pip setuptools
poetry install --only linters
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
poetry run flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
poetry run flake8 --count --exit-zero --statistics