-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (34 loc) · 1.35 KB
/
python.yml
File metadata and controls
38 lines (34 loc) · 1.35 KB
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
34
35
36
37
38
name: Run Python Linter
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Display Python version
run: |
python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f ClimateMonitorV2/public/files/requirements.txt ]
then
pip install -r ClimateMonitorV2/public/files/requirements.txt
fi
- name: Lint with flake8
### stop the build if there are Python syntax errors or undefined names. Can also be run via npm run pylint
# flake8 ClimateMonitorV2/public/files/*.py --count --extend-ignore= --show-source --statistics
### Send report (exit-zero treats all errors as warnings, GitHub editor is 127 chars wide)
# flake8 ClimateMonitorV2/public/files/*.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
run: |
flake8 ClimateMonitorV2/public/files/*.py --count --extend-ignore=E111,E302,E501,E722,W293 --show-source --statistics
flake8 ClimateMonitorV2/public/files/*.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics