mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-02 05:46:25 -06:00
GitHub Action: Lint Python code with flake8
This commit is contained in:
parent
3feba2997f
commit
bf58242c1d
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -36,13 +36,17 @@ jobs:
|
|||||||
- name: Install dependencies & set up configuration
|
- name: Install dependencies & set up configuration
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install coverage flake8 -r requirements.txt
|
||||||
pip install pycodestyle coverage
|
|
||||||
ln -s configuration.testing.py netbox/netbox/configuration.py
|
ln -s configuration.testing.py netbox/netbox/configuration.py
|
||||||
|
|
||||||
- name: Check PEP8 compliance
|
- name: Check PEP8 compliance
|
||||||
run: pycodestyle --ignore=W504,E501 netbox/
|
run: pycodestyle --ignore=W504,E501 netbox/
|
||||||
|
|
||||||
|
- name: Lint Python code with flake8
|
||||||
|
run: flake8 --ignore=E302,F401,F403,F405,F541,F811,F841,W504
|
||||||
|
--max-complexity=28 --max-line-length=1559
|
||||||
|
--show-source --statistics .
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: coverage run --source="netbox/" netbox/manage.py test netbox/
|
run: coverage run --source="netbox/" netbox/manage.py test netbox/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user